|
|
|
@ -47,12 +47,10 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user email' do
|
|
|
|
|
Cartodb.with_config(bypass_static_pages: true) do
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.email)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
@ -72,12 +70,10 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user username' do
|
|
|
|
|
Cartodb.with_config(bypass_static_pages: true) do
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.username)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
@ -97,12 +93,10 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user id' do
|
|
|
|
|
Cartodb.with_config(bypass_static_pages: true) do
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.id)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
@ -122,30 +116,24 @@ describe ApplicationController do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'loads the dashboard for a known user id' do
|
|
|
|
|
Cartodb.with_config(bypass_static_pages: true) do
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.id)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
|
Cartodb.with_config(bypass_static_pages: true) do
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.username)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
|
Cartodb.with_config(bypass_static_pages: true) do
|
|
|
|
|
stub_load_common_data
|
|
|
|
|
get dashboard_url, {}, authentication_headers(@user.email)
|
|
|
|
|
response.status.should == 200
|
|
|
|
|
response.body.should_not include("Log in")
|
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
|