]> git.openstreetmap.org Git - rails.git/commitdiff
Test state of created comment
authorAnton Khorev <tony29@yandex.ru>
Thu, 13 Feb 2025 00:33:48 +0000 (03:33 +0300)
committerAnton Khorev <tony29@yandex.ru>
Thu, 13 Feb 2025 21:15:52 +0000 (00:15 +0300)
test/controllers/api/changeset_comments_controller_test.rb

index c5e53ad6d23c59b8ac3d2992e1e62a34fb3deb24..b3dc19325910939eb877ec41886ba88754a023d2 100644 (file)
@@ -153,6 +153,12 @@ module Api
         post changeset_comment_path(changeset), :params => { :text => "This is a comment" }, :headers => auth_header
         assert_response :success
       end
+
+      comment = ChangesetComment.last
+      assert_equal changeset.id, comment.changeset_id
+      assert_equal user.id, comment.author_id
+      assert_equal "This is a comment", comment.body
+      assert comment.visible
     end
 
     ##