|
|
|
@ -47,10 +47,12 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user email' do
|
|
|
|
|
# we use this to avoid generating the static assets in CI
|
|
|
|
|
Admin::VisualizationsController.any_instance.stubs(:render).returns('')
|
|
|
|
|
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.email)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user email' do
|
|
|
|
@ -70,10 +72,12 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user username' do
|
|
|
|
|
# we use this to avoid generating the static assets in CI
|
|
|
|
|
Admin::VisualizationsController.any_instance.stubs(:render).returns('')
|
|
|
|
|
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.username)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user username' do
|
|
|
|
@ -93,10 +97,12 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user id' do
|
|
|
|
|
# we use this to avoid generating the static assets in CI
|
|
|
|
|
Admin::VisualizationsController.any_instance.stubs(:render).returns('')
|
|
|
|
|
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.id)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user id' do
|
|
|
|
@ -116,24 +122,30 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user id' do
|
|
|
|
|
# we use this to avoid generating the static assets in CI
|
|
|
|
|
Admin::VisualizationsController.any_instance.stubs(:render).returns('')
|
|
|
|
|
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.id)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user username' do
|
|
|
|
|
# we use this to avoid generating the static assets in CI
|
|
|
|
|
Admin::VisualizationsController.any_instance.stubs(:render).returns('')
|
|
|
|
|
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.username)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user email' do
|
|
|
|
|
# we use this to avoid generating the static assets in CI
|
|
|
|
|
Admin::VisualizationsController.any_instance.stubs(:render).returns('')
|
|
|
|
|
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.email)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user id' do
|
|
|
|
|