aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/user_controller_spec.rb12
-rw-r--r--spec/fixtures/users.yml2
2 files changed, 8 insertions, 6 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index ad8b4a6d4..331428cf8 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -5,27 +5,27 @@ describe UserController, "when showing a user" do
fixtures :users, :outgoing_messages, :incoming_messages, :info_requests, :info_request_events
it "should be successful" do
- get :show, :simple_name => "bob-smith"
+ get :show, :url_name => "bob-smith"
response.should be_success
end
it "should redirect to lower case name if given one with capital letters" do
- get :show, :simple_name => "Bob-Smith"
- response.should redirect_to(:controller => 'user', :action => 'show', :simple_name => "bob-smith")
+ get :show, :url_name => "Bob-Smith"
+ response.should redirect_to(:controller => 'user', :action => 'show', :url_name => "bob-smith")
end
it "should render with 'show' template" do
- get :show, :simple_name => "bob-smith"
+ get :show, :url_name => "bob-smith"
response.should render_template('show')
end
it "should assign the user" do
- get :show, :simple_name => "bob-smith"
+ get :show, :url_name => "bob-smith"
assigns[:display_users].should == [ users(:bob_smith_user) ]
end
it "should assign the user for a more complex name" do
- get :show, :simple_name => "silly-emnameem"
+ get :show, :url_name => "silly-emnameem"
assigns[:display_users].should == [ users(:silly_name_user) ]
end
diff --git a/spec/fixtures/users.yml b/spec/fixtures/users.yml
index 092d76e45..9daa34bd0 100644
--- a/spec/fixtures/users.yml
+++ b/spec/fixtures/users.yml
@@ -1,6 +1,7 @@
bob_smith_user:
id: "1"
name: Bob Smith
+ url_name: bob-smith
email: bob@localhost
salt: "-6116981980.392287733335677"
hashed_password: 6b7cd45a5f35fd83febc0452a799530398bfb6e8 # jonespassword
@@ -10,6 +11,7 @@ bob_smith_user:
silly_name_user:
id: "2"
name: "Silly <em>Name</em>"
+ url_name: silly-emnameem
email: silly@localhost
salt: "-6116981980.392287733335677"
hashed_password: 6b7cd45a5f35fd83febc0452a799530398bfb6e8 # jonespassword