Rename bubbles => cards
This commit is contained in:
@@ -6,15 +6,15 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "create" do
|
||||
assert_difference "bubbles(:logo).messages.comments.count", +1 do
|
||||
post bucket_bubble_comments_url(buckets(:writebook), bubbles(:logo), params: { comment: { body: "Agreed." } })
|
||||
assert_difference "cards(:logo).messages.comments.count", +1 do
|
||||
post collection_card_comments_url(collections(:writebook), cards(:logo), params: { comment: { body: "Agreed." } })
|
||||
end
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "update" do
|
||||
put bucket_bubble_comment_url(buckets(:writebook), bubbles(:logo), comments(:logo_agreement_kevin)), params: { comment: { body: "I've changed my mind" } }
|
||||
put collection_card_comment_url(collections(:writebook), cards(:logo), comments(:logo_agreement_kevin)), params: { comment: { body: "I've changed my mind" } }
|
||||
|
||||
assert_response :success
|
||||
assert_equal "I've changed my mind", comments(:logo_agreement_kevin).reload.body.content
|
||||
@@ -22,7 +22,7 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "update another user's comment" do
|
||||
assert_no_changes "comments(:logo_agreement_jz).body.content" do
|
||||
put bucket_bubble_comment_url(buckets(:writebook), bubbles(:logo), comments(:logo_agreement_jz)), params: { comment: { body: "I've changed my mind" } }
|
||||
put collection_card_comment_url(collections(:writebook), cards(:logo), comments(:logo_agreement_jz)), params: { comment: { body: "I've changed my mind" } }
|
||||
end
|
||||
|
||||
assert_response :forbidden
|
||||
|
||||
Reference in New Issue
Block a user