diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 1ce500268..f6cc2deae 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -65,7 +65,8 @@ describe RegistrationsController do it "redirects to the home path" do get :create, @valid_params - response.should redirect_to aspects_path + response.should be_redirect + response.location.should match /^#{aspects_url}\??$/ end end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 5197c3f84..f7b9a133b 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -26,13 +26,15 @@ describe SessionsController do describe "#create" do it "redirects to /aspects for a non-mobile user" do post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} - response.should redirect_to aspects_path + response.should be_redirect + response.location.should match /^#{aspects_url}\??$/ end it "redirects to /aspects for a mobile user" do @request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7' post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} - response.should redirect_to aspects_path + response.should be_redirect + response.location.should match /^#{aspects_url}\??$/ end it 'queues up an update job' do