aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/model_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/model_test.rb')
-rw-r--r--test/unit/model_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/model_test.rb b/test/unit/model_test.rb
index 99a249946a..43da9c7a73 100644
--- a/test/unit/model_test.rb
+++ b/test/unit/model_test.rb
@@ -21,6 +21,14 @@ class ActionText::ModelTest < ActiveSupport::TestCase
assert_not message.content.present?
end
+ test "with blank content" do
+ message = Message.create!(subject: "Greetings", content: "")
+ assert_not message.content.nil?
+ assert message.content.blank?
+ assert message.content.empty?
+ assert_not message.content.present?
+ 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))