From 24a792b27884e411a94366e9e0606ebfa7d86153 Mon Sep 17 00:00:00 2001 From: francis Date: Thu, 8 Nov 2007 12:57:01 +0000 Subject: Redirect to simplified name URL if given complex one --- spec/controllers/user_controller_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (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 239b7cf56..432c56bb7 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -8,6 +8,11 @@ describe UserController, "when showing a user" do 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") + end + it "should render with 'show' template" do get :show, :simple_name => "bob_smith" response.should render_template('show') -- cgit v1.2.3