Fixed md5sum of unit test, added class to read test emails form stdin.
This commit is contained in:
parent
f57e15e984
commit
a25588c1c3
2 changed files with 13 additions and 2 deletions
11
app/models/channel/mail_stdin.rb
Normal file
11
app/models/channel/mail_stdin.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
class Channel::MailStdin < Channel::EmailParser
|
||||||
|
include UserInfo
|
||||||
|
|
||||||
|
def initialize
|
||||||
|
puts "read main from STDIN"
|
||||||
|
|
||||||
|
msg = ARGF.read
|
||||||
|
|
||||||
|
process( {}, msg )
|
||||||
|
end
|
||||||
|
end
|
|
@ -6,7 +6,7 @@ class EmailParserTest < ActiveSupport::TestCase
|
||||||
files = [
|
files = [
|
||||||
{
|
{
|
||||||
:data => IO.read('test/fixtures/mail1.box'),
|
:data => IO.read('test/fixtures/mail1.box'),
|
||||||
:body_md5 => 'b57d21dcac6b05e1aa67af51a9e4c1ec',
|
:body_md5 => 'd62c8530fc8fd35bcff0b599db95a170',
|
||||||
:params => {
|
:params => {
|
||||||
:from => 'John.Smith@example.com',
|
:from => 'John.Smith@example.com',
|
||||||
:from_email => 'John.Smith@example.com',
|
:from_email => 'John.Smith@example.com',
|
||||||
|
@ -141,7 +141,7 @@ Managing Director: Martin Edenhofer
|
||||||
:attachments => [
|
:attachments => [
|
||||||
{
|
{
|
||||||
:md5 => '635e03d2ddde520b925262c8ffd03234',
|
:md5 => '635e03d2ddde520b925262c8ffd03234',
|
||||||
:filename => 'message.html',
|
:filename => 'message.html',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
:params => {
|
:params => {
|
||||||
|
|
Loading…
Reference in a new issue