mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
e29f4a3496
- Add support classes and settings to enable reply by email - Split out Email builder to be more OO, add many specs
19 lines
497 B
Ruby
19 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
|