|
|
|
@ -47,13 +47,11 @@ 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
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user email' do
|
|
|
|
|
get dashboard_url, {}, authentication_headers('wadus@wadus.com')
|
|
|
|
@ -72,13 +70,11 @@ 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
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user username' do
|
|
|
|
|
get dashboard_url, {}, authentication_headers("unknownuser")
|
|
|
|
@ -97,13 +93,11 @@ 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
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user id' do
|
|
|
|
|
get dashboard_url, {}, authentication_headers(UUIDTools::UUID.timestamp_create.to_s)
|
|
|
|
@ -122,31 +116,25 @@ 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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'does not load the dashboard for an unknown user id' do
|
|
|
|
|
get dashboard_url, {}, authentication_headers(UUIDTools::UUID.timestamp_create.to_s)
|
|
|
|
|