From c0ef1a88ad2e8c92e4e2da9c387da5e171938ccc Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Thu, 13 Feb 2025 03:33:48 +0300 Subject: [PATCH] Test state of created comment --- test/controllers/api/changeset_comments_controller_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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 ## -- 2.39.5