Skip to content

Commit

Permalink
相談部屋についてもアサーションを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
monyatto committed Jul 31, 2023
1 parent c84dc80 commit eba7c7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/models/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -687,15 +687,17 @@ class UserTest < ActiveSupport::TestCase
end

test '#create_comebacked_comment' do
hajime = users(:hajime)
assert_difference 'Comment.count', 1 do
users(:hajime).create_comebacked_comment
hajime.create_comebacked_comment
end
comment = Comment.last
description = "お帰りなさい!!復会ありがとうございます。\n" \
'休会中に何か変わったことがあれば、再びスムーズに学び始めることができるように全力でサポートします。' \
"何か困ったことや質問があれば、遠慮なくご相談ください。\n\n" \
"またフィヨルドブートキャンプの Discord のサーバーに入室できるように、再度、Doc にある Discord の招待 URL にアクセスをお願いします。\n" \
'<https://bootcamp.fjord.jp/practices/129#url>'
assert_equal hajime.id, comment.commentable.user_id
assert_equal users(:komagata).id, comment.user_id
assert_equal description, comment.body
end
Expand Down

0 comments on commit eba7c7e

Please sign in to comment.