Fix #5146: Adding an existing favorite to favorite groups leads to an error.
Show "Favgroup already contains post XXX" error when trying to add a post to a favgroup that already contains that post.
This commit is contained in:
@@ -534,8 +534,7 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
|
||||
@pool = create(:pool)
|
||||
@pool.add!(@post)
|
||||
|
||||
@favgroup = create(:favorite_group)
|
||||
@favgroup.add!(@post)
|
||||
@favgroup = create(:favorite_group, post_ids: [@post.id])
|
||||
|
||||
@comment = create(:comment, post: @post, creator: @admin)
|
||||
create(:comment_vote, comment: @comment, user: @user)
|
||||
|
||||
Reference in New Issue
Block a user