From: Anton Khorev Date: Thu, 13 Feb 2025 00:33:48 +0000 (+0300) Subject: Test state of created comment X-Git-Tag: live~161^2~7 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/c0ef1a88ad2e8c92e4e2da9c387da5e171938ccc?ds=inline Test state of created comment --- diff --git a/test/controllers/api/changeset_comments_controller_test.rb b/test/controllers/api/changeset_comments_controller_test.rb index c5e53ad6d..b3dc19325 100644 --- a/test/controllers/api/changeset_comments_controller_test.rb +++ b/test/controllers/api/changeset_comments_controller_test.rb @@ -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 ##