Skip to content

Commit

Permalink
Don't delete the seeded initial superusers between tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed Nov 27, 2016
1 parent c344bc0 commit 19bb9b4
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/api-umbrella/proxy/startup/seed_database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ local function seed_initial_superusers()
local data = {
username = username,
superuser = true,
registration_source = "seed",
}

if admin then
Expand Down
2 changes: 1 addition & 1 deletion test/admin_ui/test_login.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Test::AdminUi::TestLogin < Minitest::Capybara::Test

def setup
setup_server
Admin.delete_all
Admin.where(:registration_source.ne => "seed").delete_all
end

def test_facebook
Expand Down
2 changes: 1 addition & 1 deletion test/apis/v1/admins/test_admin_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Test::Apis::V1::Admins::TestAdminPermissions < Minitest::Capybara::Test

def setup
setup_server
Admin.delete_all
Admin.where(:registration_source.ne => "seed").delete_all
AdminGroup.delete_all
ApiScope.delete_all
end
Expand Down
2 changes: 1 addition & 1 deletion test/apis/v1/admins/test_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Test::Apis::V1::Admins::TestCreate < Minitest::Capybara::Test

def setup
setup_server
Admin.delete_all
Admin.where(:registration_source.ne => "seed").delete_all
end

def test_downcases_username
Expand Down
2 changes: 1 addition & 1 deletion test/apis/v1/admins/test_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Test::Apis::V1::Admins::TestIndex < Minitest::Capybara::Test

def setup
setup_server
Admin.delete_all
Admin.where(:registration_source.ne => "seed").delete_all
end

def test_paginate_results
Expand Down
2 changes: 1 addition & 1 deletion test/apis/v1/users/test_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Test::Apis::V1::Users::TestPermissions < Minitest::Capybara::Test
def setup
setup_server
ApiUser.where(:registration_source.ne => "seed").delete_all
Admin.delete_all
Admin.where(:registration_source.ne => "seed").delete_all
AdminGroup.delete_all
Api.delete_all
ApiScope.delete_all
Expand Down
2 changes: 1 addition & 1 deletion test/apis/v1/users/test_role_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Test::Apis::V1::Users::TestRolePermissions < Minitest::Capybara::Test
def setup
setup_server
ApiUser.where(:registration_source.ne => "seed").delete_all
Admin.delete_all
Admin.where(:registration_source.ne => "seed").delete_all
AdminGroup.delete_all
Api.delete_all
ApiScope.delete_all
Expand Down

0 comments on commit 19bb9b4

Please sign in to comment.