aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/model_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-05-29 16:13:49 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-05-29 16:13:49 +0200
commit4cc241dc6c04913b3c84bb35d9cffd1a58a1d61f (patch)
treee0b11ad2e9fe3fb9adfd61c3c742607a13ef16f7 /test/unit/model_test.rb
parented42e6193050cac070f7d68033ab454b4622bedd (diff)
downloadrails-4cc241dc6c04913b3c84bb35d9cffd1a58a1d61f.tar.gz
rails-4cc241dc6c04913b3c84bb35d9cffd1a58a1d61f.tar.bz2
rails-4cc241dc6c04913b3c84bb35d9cffd1a58a1d61f.zip
Test saving the dependent models
Diffstat (limited to 'test/unit/model_test.rb')
-rw-r--r--test/unit/model_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/model_test.rb b/test/unit/model_test.rb
new file mode 100644
index 0000000000..b7c5333c4d
--- /dev/null
+++ b/test/unit/model_test.rb
@@ -0,0 +1,10 @@
+require_relative '../test_helper'
+
+module ActionText
+ class ModelTest < ActiveSupport::TestCase
+ test "saving content" do
+ message = Message.create!(subject: "Greetings", content: "<h1>Hello world</h1>")
+ assert_equal "Hello world", message.content.body.to_plain_text
+ end
+ end
+end