discourse/spec/components/email/receiver_spec.rb
Robin Ward e29f4a3496 Work in Progress: Reply By Email:
- Add support classes and settings to enable reply by email
- Split out Email builder to be more OO, add many specs
2013-06-13 12:39:56 -04:00

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