aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/content_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/content_test.rb b/test/unit/content_test.rb
index b1a06e2cfa..f1acf054db 100644
--- a/test/unit/content_test.rb
+++ b/test/unit/content_test.rb
@@ -6,5 +6,11 @@ module ActionText
message = Message.new(subject: "Greetings", content: "<h1>Hello world</h1>")
assert_equal "Hello world", message.content.body.to_plain_text
end
+
+ test "embed extraction" do
+ blob = create_file_blob(filename: "racecar.jpg", content_type: "image/jpg")
+ message = Message.create!(subject: "Greetings", content: ActionText::Content.new("Hello world").append_attachables(blob))
+ assert_equal "racecar.jpg", message.content.embeds.first.filename.to_s
+ end
end
end