diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/models/project_services/issue_tracker_service_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/models/project_services/issue_tracker_service_spec.rb')
-rw-r--r-- | spec/models/project_services/issue_tracker_service_spec.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/spec/models/project_services/issue_tracker_service_spec.rb b/spec/models/project_services/issue_tracker_service_spec.rb deleted file mode 100644 index 5b12c7330b8..00000000000 --- a/spec/models/project_services/issue_tracker_service_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe IssueTrackerService do - describe 'Validations' do - let(:project) { create :project } - - describe 'only one issue tracker per project' do - let(:service) { RedmineService.new(project: project, active: true, issue_tracker_data: build(:issue_tracker_data)) } - - before do - create(:custom_issue_tracker_service, project: project) - end - - context 'when service is changed manually by user' do - it 'executes the validation' do - valid = service.valid?(:manual_change) - - expect(valid).to be_falsey - expect(service.errors[:base]).to include( - 'Another issue tracker is already in use. Only one issue tracker service can be active at a time' - ) - end - end - - context 'when service is changed internally' do - it 'does not execute the validation' do - expect(service.valid?).to be_truthy - end - end - end - end -end |