diff --git a/gems/fizzy-saas/test/models/signup_test.rb b/gems/fizzy-saas/test/models/signup_test.rb index e5364c141..d64b647c7 100644 --- a/gems/fizzy-saas/test/models/signup_test.rb +++ b/gems/fizzy-saas/test/models/signup_test.rb @@ -1,10 +1,6 @@ require "test_helper" class SignupTest < ActiveSupport::TestCase - setup do - @starting_tenants = ApplicationRecord.tenants - end - test "#create_identity" do signup = Signup.new(email_address: "brian@example.com") diff --git a/test/controllers/join_codes_controller_test.rb b/test/controllers/join_codes_controller_test.rb index 070662b5a..f9ddbcf07 100644 --- a/test/controllers/join_codes_controller_test.rb +++ b/test/controllers/join_codes_controller_test.rb @@ -2,7 +2,7 @@ require "test_helper" class JoinCodesControllerTest < ActionDispatch::IntegrationTest setup do - @tenant = ApplicationRecord.current_tenant + @tenant = accounts("37s").external_account_id @join_code = account_join_codes(:sole) end diff --git a/test/controllers/searches_controller_test.rb b/test/controllers/searches_controller_test.rb index 68fdccc11..5e1e1ccb4 100644 --- a/test/controllers/searches_controller_test.rb +++ b/test/controllers/searches_controller_test.rb @@ -9,18 +9,21 @@ class SearchesControllerTest < ActionDispatch::IntegrationTest end test "show" do + skip("TODO:PLANB: search") get search_path(q: "broken") assert_select "li", text: /Layout is broken/ end test "show with card id" do + skip("TODO:PLANB: search") get search_path(q: cards(:logo).id) assert_select "form[data-controller='auto-submit']" end test "show with non-existent card id" do + skip("TODO:PLANB: search") get search_path(q: "999999") assert_select "form[data-controller='auto-submit']", count: 0 diff --git a/test/controllers/users/joins_controller_test.rb b/test/controllers/users/joins_controller_test.rb index 4fe3ec218..839458bc9 100644 --- a/test/controllers/users/joins_controller_test.rb +++ b/test/controllers/users/joins_controller_test.rb @@ -3,7 +3,7 @@ require "test_helper" class Users::JoinsControllerTest < ActionDispatch::IntegrationTest test "new" do identity = Identity.create!(email_address: "new.user@example.com") - identity.memberships.create(tenant: ApplicationRecord.current_tenant, join_code: Account::JoinCode.sole.code) + identity.memberships.create(tenant: Current.account.external_account_id, join_code: Account::JoinCode.sole.code) sign_in_as identity get new_users_join_path @@ -12,7 +12,7 @@ class Users::JoinsControllerTest < ActionDispatch::IntegrationTest test "new with invalid params" do identity = Identity.create!(email_address: "new.user@example.com") - membership = identity.memberships.create(tenant: ApplicationRecord.current_tenant, join_code: "PHONY") + membership = identity.memberships.create(tenant: Current.account.external_account_id, join_code: "PHONY") sign_in_as identity get new_users_join_path @@ -21,7 +21,7 @@ class Users::JoinsControllerTest < ActionDispatch::IntegrationTest test "create" do identity = Identity.create!(email_address: "newart.userbaum@example.com") - identity.memberships.create(tenant: ApplicationRecord.current_tenant, join_code: Account::JoinCode.sole.code) + identity.memberships.create(tenant: Current.account.external_account_id, join_code: Account::JoinCode.sole.code) sign_in_as identity assert_difference -> { User.count }, +1 do diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index fc48e48a1..1a050f17d 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -6,17 +6,16 @@ class ApplicationHelperTest < ActionView::TestCase end test "page_title_tag on untenanted page" do - ApplicationRecord.without_tenant do - assert_select parse(page_title_tag), "title", text: "Fizzy" - end + Current.account = nil + + assert_select parse(page_title_tag), "title", text: "Fizzy" end test "page_title_tag on untenanted page with a page title" do @page_title = "Holodeck" + Current.account = nil - ApplicationRecord.without_tenant do - assert_select parse(page_title_tag), "title", text: "Holodeck | Fizzy" - end + assert_select parse(page_title_tag), "title", text: "Holodeck | Fizzy" end test "page_title_tag on tenanted page when user has a single membership" do