diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 27ede5e5b6983db7a87456e72ca4476608a0357d..e38b7ed3a62ecb471ade9bbfeb9465c89f099a10 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -132,6 +132,6 @@ class ApplicationController < ActionController::Base end def current_user_redirect_path - current_user.getting_started? ? getting_started_path : root_path + current_user.getting_started? ? getting_started_path : stream_path end end diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 9d52c4d64fde38e279ac2c54a053bf9c956984da..31d060c3cba7a1093ec433bc29845f5fbb27847a 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -79,7 +79,7 @@ describe RegistrationsController do it "redirects to the home path" do get :create, @valid_params response.should be_redirect - response.location.should match /^#{root_url}\??$/ + response.location.should match /^#{stream_url}\??$/ end end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index e36d5a7359043e898f0e6c4c3f28f8b526ea7868..3efcb616b3a09ba525c039883269253dc77a8cf3 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -18,17 +18,17 @@ describe SessionsController do end describe "#create" do - it "redirects to root_path for a non-mobile user" do + it "redirects to /stream for a non-mobile user" do post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}} response.should be_redirect - response.location.should match /^#{root_url}\??$/ + response.location.should match /^#{stream_url}\??$/ end it "redirects to /stream 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 be_redirect - response.location.should match /^#{root_url}\??$/ + response.location.should match /^#{stream_url}\??$/ end end