Skip to content

Commit

Permalink
#3879 moar spec stabilization
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartones committed Jun 4, 2015
1 parent 3be18e2 commit 42a77b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/requests/admin/tables_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def app
end

before(:each) do
CartoDB::NamedMapsWrapper::NamedMaps.any_instance.stubs(:get => nil, :create => true, :update => true)
CartoDB::Varnish.any_instance.stubs(:send_command).returns(true)
@db = Rails::Sequel.connection
delete_user_data @user
Expand Down
1 change: 1 addition & 0 deletions spec/requests/admin/visualizations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def app

before(:each) do
CartoDB::Visualization::Member.any_instance.stubs(:has_named_map?).returns(false)
CartoDB::NamedMapsWrapper::NamedMaps.any_instance.stubs(:get => nil, :create => true, :update => true)

@db = Rails::Sequel.connection
Sequel.extension(:pagination)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
end

before(:each) do
CartoDB::NamedMapsWrapper::NamedMaps.any_instance.stubs(:get => nil, :create => true, :update => true)
delete_user_data @user
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def test_organization
include_context 'users helper'

before(:each) do
CartoDB::NamedMapsWrapper::NamedMaps.any_instance.stubs(:get => nil, :create => true, :update => true)

login(@user1)
@headers = {'CONTENT_TYPE' => 'application/json'}
host! "#{@user1.subdomain}.localhost.lan"
Expand Down Expand Up @@ -144,6 +146,8 @@ def test_organization
end

before(:each) do
CartoDB::NamedMapsWrapper::NamedMaps.any_instance.stubs(:get => nil, :create => true, :update => true)

CartoDB::Varnish.any_instance.stubs(:send_command).returns(true)
@db = Rails::Sequel.connection
Sequel.extension(:pagination)
Expand All @@ -170,7 +174,6 @@ def test_organization

it 'tests exclude_shared and only_shared filters' do
CartoDB::Visualization::Member.any_instance.stubs(:has_named_map?).returns(false)
CartoDB::NamedMapsWrapper::NamedMaps.any_instance.stubs(:get => nil, :create => true, :update => true)

user_1 = create_user(
username: "test#{rand(9999)}-1",
Expand Down

0 comments on commit 42a77b0

Please sign in to comment.