mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-22 02:00:12 +01:00
handle multipart emails better in message_gateway
This commit is contained in:
parent
cbf7a6fd43
commit
29c5103a98
4 changed files with 1534 additions and 2 deletions
|
|
@ -40,7 +40,25 @@ class MessageGatewayTest < ActiveSupport::TestCase
|
|||
assert_equal(@user, message_todo.user)
|
||||
assert_equal("This is the message body", message_todo.notes)
|
||||
end
|
||||
|
||||
def test_email_with_winmail_dat
|
||||
todo_count = Todo.count
|
||||
|
||||
load_message('email_with_winmail.txt')
|
||||
|
||||
# assert some stuff about it being created
|
||||
assert_equal(todo_count+1, Todo.count)
|
||||
end
|
||||
|
||||
def test_email_with_multipart_attachments
|
||||
todo_count = Todo.count
|
||||
|
||||
load_message('email_with_multipart.txt')
|
||||
|
||||
# assert some stuff about it being created
|
||||
assert_equal(todo_count+1, Todo.count)
|
||||
end
|
||||
|
||||
def test_no_user
|
||||
todo_count = Todo.count
|
||||
badmessage = File.read(File.join(Rails.root, 'test', 'fixtures', 'sample_sms.txt'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue