diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/models/service_spec.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/models/service_spec.rb')
-rw-r--r-- | spec/models/service_spec.rb | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb index cb8122b6573..106f8def42d 100644 --- a/spec/models/service_spec.rb +++ b/spec/models/service_spec.rb @@ -87,6 +87,20 @@ describe Service do end end + describe '#operating?' do + it 'is false when the service is not active' do + expect(build(:service).operating?).to eq(false) + end + + it 'is false when the service is not persisted' do + expect(build(:service, active: true).operating?).to eq(false) + end + + it 'is true when the service is active and persisted' do + expect(create(:service, active: true).operating?).to eq(true) + end + end + describe '.confidential_note_hooks' do it 'includes services where confidential_note_events is true' do create(:service, active: true, confidential_note_events: true) @@ -523,24 +537,6 @@ describe Service do end end - describe "#deprecated?" do - let(:project) { create(:project, :repository) } - - it 'returns false by default' do - service = create(:service, project: project) - expect(service.deprecated?).to be_falsy - end - end - - describe "#deprecation_message" do - let(:project) { create(:project, :repository) } - - it 'is empty by default' do - service = create(:service, project: project) - expect(service.deprecation_message).to be_nil - end - end - describe '#api_field_names' do let(:fake_service) do Class.new(Service) do |