diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/services/members/create_service_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/services/members/create_service_spec.rb')
-rw-r--r-- | spec/services/members/create_service_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/services/members/create_service_spec.rb b/spec/services/members/create_service_spec.rb index fe9f3ddc14d..25696ca209e 100644 --- a/spec/services/members/create_service_spec.rb +++ b/spec/services/members/create_service_spec.rb @@ -20,10 +20,10 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ case source when Project source.add_maintainer(user) - OnboardingProgress.onboard(source.namespace) + Onboarding::Progress.onboard(source.namespace) when Group source.add_owner(user) - OnboardingProgress.onboard(source) + Onboarding::Progress.onboard(source) end end @@ -59,7 +59,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'adds a user to members' do expect(execute_service[:status]).to eq(:success) expect(source.users).to include member - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(true) end context 'when user_id is passed as an integer' do @@ -68,7 +68,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'successfully creates member' do expect(execute_service[:status]).to eq(:success) expect(source.users).to include member - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(true) end end @@ -78,7 +78,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'successfully creates members' do expect(execute_service[:status]).to eq(:success) expect(source.users).to include(member, user_invited_by_id) - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(true) end end @@ -88,7 +88,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'successfully creates members' do expect(execute_service[:status]).to eq(:success) expect(source.users).to include(member, user_invited_by_id) - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(true) end end @@ -98,7 +98,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'adds a user to members' do expect(execute_service[:status]).to eq(:success) expect(source.users).to include member - expect(OnboardingProgress.completed?(source, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source, :user_added)).to be(true) end it 'triggers a members added event' do @@ -119,7 +119,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ expect(execute_service[:status]).to eq(:error) expect(execute_service[:message]).to be_present expect(source.users).not_to include member - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(false) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(false) end end @@ -130,7 +130,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ expect(execute_service[:status]).to eq(:error) expect(execute_service[:message]).to be_present expect(source.users).not_to include member - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(false) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(false) end end @@ -141,7 +141,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ expect(execute_service[:status]).to eq(:error) expect(execute_service[:message]).to include("#{member.username}: Access level is not included in the list") expect(source.users).not_to include member - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(false) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(false) end end @@ -153,7 +153,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'allows already invited members to be re-invited by email and updates the member access' do expect(execute_service[:status]).to eq(:success) expect(invited_member.reset.access_level).to eq ProjectMember::MAINTAINER - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(true) end end @@ -170,7 +170,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'does not update the member' do expect(execute_service[:status]).to eq(:error) expect(execute_service[:message]).to eq("#{project_bot.username}: not authorized to update member") - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(false) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(false) end end @@ -178,7 +178,7 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_ it 'adds the member' do expect(execute_service[:status]).to eq(:success) expect(source.users).to include project_bot - expect(OnboardingProgress.completed?(source.namespace, :user_added)).to be(true) + expect(Onboarding::Progress.completed?(source.namespace, :user_added)).to be(true) end end end |