diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/lib/gitlab/service_desk_email_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/lib/gitlab/service_desk_email_spec.rb')
-rw-r--r-- | spec/lib/gitlab/service_desk_email_spec.rb | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/spec/lib/gitlab/service_desk_email_spec.rb b/spec/lib/gitlab/service_desk_email_spec.rb index 6667b61c02b..69569c0f194 100644 --- a/spec/lib/gitlab/service_desk_email_spec.rb +++ b/spec/lib/gitlab/service_desk_email_spec.rb @@ -1,39 +1,11 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'spec_helper' RSpec.describe Gitlab::ServiceDeskEmail do - describe '.enabled?' do - context 'when service_desk_email is enabled and address is set' do - before do - stub_service_desk_email_setting(enabled: true, address: 'foo') - end + let(:setting_name) { :service_desk_email } - it 'returns true' do - expect(described_class.enabled?).to be_truthy - end - end - - context 'when service_desk_email is disabled' do - before do - stub_service_desk_email_setting(enabled: false, address: 'foo') - end - - it 'returns false' do - expect(described_class.enabled?).to be_falsey - end - end - - context 'when service desk address is not set' do - before do - stub_service_desk_email_setting(enabled: true, address: nil) - end - - it 'returns false' do - expect(described_class.enabled?).to be_falsey - end - end - end + it_behaves_like 'common email methods' describe '.key_from_address' do context 'when service desk address is set' do @@ -78,10 +50,4 @@ RSpec.describe Gitlab::ServiceDeskEmail do end end end - - context 'self.key_from_fallback_message_id' do - it 'returns reply key' do - expect(described_class.key_from_fallback_message_id('reply-key@localhost')).to eq('key') - end - end end |