mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
FIX: Failing specs
This commit is contained in:
parent
78889163bf
commit
c3e5ee1d7e
@ -11,10 +11,12 @@ describe Jobs::PollMailbox do
|
||||
|
||||
let!(:poller) { Jobs::PollMailbox.new }
|
||||
let!(:receiver) { mock }
|
||||
let!(:email_string) { "EMAIL AS A STRING" }
|
||||
let!(:email) { mock }
|
||||
|
||||
before do
|
||||
Email::Receiver.expects(:new).with(email).returns(receiver)
|
||||
email.stubs(:pop).returns(email_string)
|
||||
Email::Receiver.expects(:new).with(email_string).returns(receiver)
|
||||
end
|
||||
|
||||
describe "all goes fine" do
|
||||
@ -33,7 +35,7 @@ describe Jobs::PollMailbox do
|
||||
receiver.expects(:process).raises(Email::Receiver::UserNotSufficientTrustLevelError)
|
||||
email.expects(:delete)
|
||||
|
||||
Mail::Message.expects(:new).returns(email)
|
||||
Mail::Message.expects(:new).with(email_string).returns(email)
|
||||
|
||||
email.expects(:from)
|
||||
email.expects(:body)
|
||||
@ -42,7 +44,7 @@ describe Jobs::PollMailbox do
|
||||
senderMock = mock
|
||||
RejectionMailer.expects(:send_trust_level).returns(clientMessage)
|
||||
Email::Sender.expects(:new).with(
|
||||
clientMessage, :email_reject_trust_level).returns(senderMock)
|
||||
clientMessage, :email_reject_trust_level).returns(senderMock)
|
||||
senderMock.expects(:send)
|
||||
end
|
||||
|
||||
@ -104,4 +106,4 @@ describe Jobs::PollMailbox do
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user