mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 06:33:38 +08:00
e29f4a3496
- Add support classes and settings to enable reply by email - Split out Email builder to be more OO, add many specs
20 lines
497 B
Ruby
20 lines
497 B
Ruby
require 'spec_helper'
|
|
require 'email/receiver'
|
|
|
|
describe Email::Receiver do
|
|
|
|
|
|
describe 'invalid key' do
|
|
let(:incoming) { Email::IncomingMessage.new('asdf', 'hello') }
|
|
|
|
it "returns unprocessable for nil message" do
|
|
expect(Email::Receiver.new(nil).process).to eq(Email::Receiver.results[:unprocessable])
|
|
end
|
|
|
|
it "returns unprocessable for a made up key" do
|
|
expect(Email::Receiver.new(incoming).process).to eq(Email::Receiver.results[:unprocessable])
|
|
end
|
|
end
|
|
|
|
end
|