X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7406ae5dcc9cbb177a8ea33085af9caf6e3ebb1b..50c5f444ed0d20f4195320421b68dd3568519cc2:/test/models/note_test.rb

diff --git a/test/models/note_test.rb b/test/models/note_test.rb
index 34b16c19d..ba87911e3 100644
--- a/test/models/note_test.rb
+++ b/test/models/note_test.rb
@@ -47,6 +47,15 @@ class NoteTest < ActiveSupport::TestCase
     assert_not_predicate create(:note, :status => "open", :closed_at => nil), :closed?
   end
 
+  def test_description
+    comment = create(:note_comment)
+    assert_equal comment.body, comment.note.description
+
+    user = create(:user)
+    comment = create(:note_comment, :author => user)
+    assert_equal comment.body, comment.note.description
+  end
+
   def test_author
     comment = create(:note_comment)
     assert_nil comment.note.author
@@ -56,6 +65,15 @@ class NoteTest < ActiveSupport::TestCase
     assert_equal user, comment.note.author
   end
 
+  def test_author_id
+    comment = create(:note_comment)
+    assert_nil comment.note.author_id
+
+    user = create(:user)
+    comment = create(:note_comment, :author => user)
+    assert_equal user.id, comment.note.author_id
+  end
+
   def test_author_ip
     comment = create(:note_comment)
     assert_nil comment.note.author_ip