Commit f17b9b2f authored by Alex Kalderimis's avatar Alex Kalderimis

Remove references to service in base_issue_tracker_spec

parent 479f810d
...@@ -7,26 +7,26 @@ RSpec.describe Integrations::BaseIssueTracker do ...@@ -7,26 +7,26 @@ RSpec.describe Integrations::BaseIssueTracker do
let(:project) { create :project } let(:project) { create :project }
describe 'only one issue tracker per project' do describe 'only one issue tracker per project' do
let(:service) { Integrations::Redmine.new(project: project, active: true, issue_tracker_data: build(:issue_tracker_data)) } let(:integration) { Integrations::Redmine.new(project: project, active: true, issue_tracker_data: build(:issue_tracker_data)) }
before do before do
create(:custom_issue_tracker_integration, project: project) create(:custom_issue_tracker_integration, project: project)
end end
context 'when service is changed manually by user' do context 'when integration is changed manually by user' do
it 'executes the validation' do it 'executes the validation' do
valid = service.valid?(:manual_change) valid = integration.valid?(:manual_change)
expect(valid).to be_falsey expect(valid).to be_falsey
expect(service.errors[:base]).to include( expect(integration.errors[:base]).to include(
'Another issue tracker is already in use. Only one issue tracker service can be active at a time' 'Another issue tracker is already in use. Only one issue tracker service can be active at a time'
) )
end end
end end
context 'when service is changed internally' do context 'when integration is changed internally' do
it 'does not execute the validation' do it 'does not execute the validation' do
expect(service.valid?).to be_truthy expect(integration.valid?).to be_truthy
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment