diff --git a/test/integration/organizations/onboarding/confirm_controller_test.rb b/test/integration/organizations/onboarding/confirm_controller_test.rb index 8c25eff3427..e7a51033729 100644 --- a/test/integration/organizations/onboarding/confirm_controller_test.rb +++ b/test/integration/organizations/onboarding/confirm_controller_test.rb @@ -36,18 +36,6 @@ class Organizations::Onboarding::ConfirmControllerTest < ActionDispatch::Integra assert page.has_content?("Organization onboarded successfully") assert_predicate @organization_onboarding.reload, :completed? - assert_predicate @organization_onboarding.organization, :present? - - organization = @organization_onboarding.organization - - assert_equal organization, @organization_onboarding.organization - assert_equal organization, @user.organizations.first - assert_equal organization, @collaborator.organizations.first - - assert_predicate @user.memberships.find_by(organization:), :owner? - assert_predicate @collaborator.memberships.find_by(organization:), :maintainer? - - assert_equal @rubygem.reload.organization, organization end should "fail to onboard the organization and render an error message" do diff --git a/test/integration/organizations/onboarding/name_controller_test.rb b/test/integration/organizations/onboarding/name_controller_test.rb index 41d61715739..b7c091cd762 100644 --- a/test/integration/organizations/onboarding/name_controller_test.rb +++ b/test/integration/organizations/onboarding/name_controller_test.rb @@ -32,6 +32,7 @@ class Organizations::Onboarding::NameControllerTest < ActionController::TestCase should "create a new onboarding and redirect to the next step" do post :create, params: { organization_onboarding: { organization_name: "New Name", organization_handle: @gem.name, name_type: "gem" } } + assert OrganizationOnboarding.exists?(organization_name: "New Name", organization_handle: @gem.name, name_type: "gem") assert_redirected_to organization_onboarding_gems_path end diff --git a/test/integration/organizations/onboarding_test.rb b/test/integration/organizations/onboarding_test.rb index b05cfa07d5c..8158d94a655 100644 --- a/test/integration/organizations/onboarding_test.rb +++ b/test/integration/organizations/onboarding_test.rb @@ -21,7 +21,7 @@ class Organizations::OnboardingControllerTest < ActionDispatch::IntegrationTest delete "/organizations/onboarding" assert_redirected_to dashboard_path - assert OrganizationOnboarding.find_by(id: organization_onboarding.id) + assert OrganizationOnboarding.exists?(id: organization_onboarding.id) end should "destroy a pending OrganizationOnboarding created by the current user" do @@ -30,7 +30,7 @@ class Organizations::OnboardingControllerTest < ActionDispatch::IntegrationTest delete "/organizations/onboarding" assert_redirected_to dashboard_path - assert_nil OrganizationOnboarding.find_by(id: organization_onboarding.id) + refute OrganizationOnboarding.exists?(id: organization_onboarding.id) end should "destroy a failed OrganizationOnboarding created by the current user" do @@ -39,7 +39,7 @@ class Organizations::OnboardingControllerTest < ActionDispatch::IntegrationTest delete "/organizations/onboarding" assert_redirected_to dashboard_path - assert_nil OrganizationOnboarding.find_by(id: organization_onboarding.id) + refute OrganizationOnboarding.exists?(id: organization_onboarding.id) end should "redirect to the dashboarding if the current user has not started organization onboarding" do