diff options
Diffstat (limited to 'spec/models/integration_spec.rb')
-rw-r--r-- | spec/models/integration_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/models/integration_spec.rb b/spec/models/integration_spec.rb index 3042fd15a7b..87ba0f3f7e6 100644 --- a/spec/models/integration_spec.rb +++ b/spec/models/integration_spec.rb @@ -3,8 +3,9 @@ require 'spec_helper' RSpec.describe Integration do - let(:project_1) { create(:project) } - let(:project_2) { create(:project) } + let!(:project_1) { create(:project) } + let!(:project_2) { create(:project) } + let!(:project_3) { create(:project) } let(:instance_integration) { create(:jira_service, :instance) } before do @@ -18,4 +19,10 @@ RSpec.describe Integration do expect(Project.with_custom_integration_for(instance_integration)).to contain_exactly(project_2) end end + + describe '#ids_without_integration' do + it 'returns projects ids without an integration' do + expect(Project.ids_without_integration(instance_integration, 100)).to contain_exactly(project_3.id) + end + end end |