Commit ce2ef0f4 authored by Thong Kuah's avatar Thong Kuah

Merge branch '344511-fix-stubbing-of-smime-certificate' into 'master'

Fix stubbing of SMIME certificate

See merge request gitlab-org/gitlab!73431
parents e467e48c 4ffc9ce7
...@@ -36,7 +36,7 @@ RSpec.describe Gitlab::Email::Hook::SmimeSignatureInterceptor do ...@@ -36,7 +36,7 @@ RSpec.describe Gitlab::Email::Hook::SmimeSignatureInterceptor do
end end
before do before do
allow(Gitlab::X509::Certificate).to receive_messages(from_files: certificate) allow(Gitlab::Email::Hook::SmimeSignatureInterceptor).to receive(:certificate).and_return(certificate)
Mail.register_interceptor(described_class) Mail.register_interceptor(described_class)
mail.deliver_now mail.deliver_now
......
...@@ -157,7 +157,7 @@ RSpec.describe EmailsOnPushWorker, :mailer do ...@@ -157,7 +157,7 @@ RSpec.describe EmailsOnPushWorker, :mailer do
end end
before do before do
allow(Gitlab::X509::Certificate).to receive_messages(from_files: certificate) allow(Gitlab::Email::Hook::SmimeSignatureInterceptor).to receive(:certificate).and_return(certificate)
Mail.register_interceptor(Gitlab::Email::Hook::SmimeSignatureInterceptor) Mail.register_interceptor(Gitlab::Email::Hook::SmimeSignatureInterceptor)
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