diff --git a/src/api-umbrella/proxy/startup/seed_database.lua b/src/api-umbrella/proxy/startup/seed_database.lua index 30b6867e1..a2349426e 100644 --- a/src/api-umbrella/proxy/startup/seed_database.lua +++ b/src/api-umbrella/proxy/startup/seed_database.lua @@ -140,6 +140,7 @@ local function seed_initial_superusers() local data = { username = username, superuser = true, + registration_source = "seed", } if admin then diff --git a/test/admin_ui/test_login.rb b/test/admin_ui/test_login.rb index a4ce920a6..c5c0521b6 100644 --- a/test/admin_ui/test_login.rb +++ b/test/admin_ui/test_login.rb @@ -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 diff --git a/test/apis/v1/admins/test_admin_permissions.rb b/test/apis/v1/admins/test_admin_permissions.rb index ad8a98034..38bd020db 100644 --- a/test/apis/v1/admins/test_admin_permissions.rb +++ b/test/apis/v1/admins/test_admin_permissions.rb @@ -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 diff --git a/test/apis/v1/admins/test_create.rb b/test/apis/v1/admins/test_create.rb index 2352c4d94..c43bbe723 100644 --- a/test/apis/v1/admins/test_create.rb +++ b/test/apis/v1/admins/test_create.rb @@ -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 diff --git a/test/apis/v1/admins/test_index.rb b/test/apis/v1/admins/test_index.rb index 86017c0e7..dea99a1bf 100644 --- a/test/apis/v1/admins/test_index.rb +++ b/test/apis/v1/admins/test_index.rb @@ -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 diff --git a/test/apis/v1/users/test_permissions.rb b/test/apis/v1/users/test_permissions.rb index 4414e8b28..b343179f7 100644 --- a/test/apis/v1/users/test_permissions.rb +++ b/test/apis/v1/users/test_permissions.rb @@ -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 diff --git a/test/apis/v1/users/test_role_permissions.rb b/test/apis/v1/users/test_role_permissions.rb index ca4e919d2..b00492ce0 100644 --- a/test/apis/v1/users/test_role_permissions.rb +++ b/test/apis/v1/users/test_role_permissions.rb @@ -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