From e2a47fa6cb017eb8672faa8778fff8bfd8a7b686 Mon Sep 17 00:00:00 2001 From: francis Date: Wed, 27 Feb 2008 13:59:51 +0000 Subject: Use names in URLs of requests. --- spec/controllers/user_controller_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/controllers/user_controller_spec.rb') diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 331428cf8..3bf7aaf51 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, :url_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, :url_name => "Bob-Smith" - response.should redirect_to(:controller => 'user', :action => 'show', :url_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, :url_name => "bob-smith" + get :show, :url_name => "bob_smith" response.should render_template('show') end it "should assign the user" do - get :show, :url_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, :url_name => "silly-emnameem" + get :show, :url_name => "silly_emnameem" assigns[:display_users].should == [ users(:silly_name_user) ] end -- cgit v1.2.3