diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 16:05:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 16:05:49 +0000 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /spec/services/customer_relations/organizations/update_service_spec.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) | |
download | gitlab-ce-16.0.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc4216-0-stable
Diffstat (limited to 'spec/services/customer_relations/organizations/update_service_spec.rb')
-rw-r--r-- | spec/services/customer_relations/organizations/update_service_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/services/customer_relations/organizations/update_service_spec.rb b/spec/services/customer_relations/organizations/update_service_spec.rb index 4764ba85551..f11b99b101e 100644 --- a/spec/services/customer_relations/organizations/update_service_spec.rb +++ b/spec/services/customer_relations/organizations/update_service_spec.rb @@ -2,12 +2,12 @@ require 'spec_helper' -RSpec.describe CustomerRelations::Organizations::UpdateService do +RSpec.describe CustomerRelations::Organizations::UpdateService, feature_category: :service_desk do let_it_be(:user) { create(:user) } - let(:organization) { create(:organization, name: 'Test', group: group, state: 'active') } + let(:crm_organization) { create(:crm_organization, name: 'Test', group: group, state: 'active') } - subject(:update) { described_class.new(group: group, current_user: user, params: params).execute(organization) } + subject(:update) { described_class.new(group: group, current_user: user, params: params).execute(crm_organization) } describe '#execute' do context 'when the user has no permission' do @@ -33,7 +33,7 @@ RSpec.describe CustomerRelations::Organizations::UpdateService do context 'when name is changed' do let(:params) { { name: 'GitLab' } } - it 'updates the organization' do + it 'updates the crm_organization' do response = update expect(response).to be_success @@ -42,7 +42,7 @@ RSpec.describe CustomerRelations::Organizations::UpdateService do end context 'when activating' do - let(:organization) { create(:organization, state: 'inactive') } + let(:crm_organization) { create(:crm_organization, state: 'inactive') } let(:params) { { active: true } } it 'updates the contact' do @@ -56,7 +56,7 @@ RSpec.describe CustomerRelations::Organizations::UpdateService do context 'when deactivating' do let(:params) { { active: false } } - it 'updates the organization' do + it 'updates the crm_organization' do response = update expect(response).to be_success @@ -64,7 +64,7 @@ RSpec.describe CustomerRelations::Organizations::UpdateService do end end - context 'when the organization is invalid' do + context 'when the crm_organization is invalid' do let(:params) { { name: nil } } it 'returns an error' do |