master
1require "rails_helper"
2
3describe "/profiles" do
4 it "routes to /profiles/<username>" do
5 expect(get: "/profiles/mokha").to route_to(
6 controller: "profiles",
7 action: "show",
8 id: "mokha"
9 )
10 end
11
12 it "routes to /u/<username>" do
13 expect(get: "/u/mokha").to route_to(
14 controller: "profiles",
15 action: "show",
16 id: "mokha"
17 )
18 end
19
20 it 'routes to /profiles/<username> with funky usernames' do
21 expect(get: "/profiles/mo.kha").to route_to(
22 controller: "profiles",
23 action: "show",
24 id: "mo.kha"
25 )
26 expect(get: "/u/mo.kha").to route_to(
27 controller: "profiles",
28 action: "show",
29 id: "mo.kha"
30 )
31 end
32end