Fix #4462: "You have already favorited this post" on upload.
Make adding the fav:self metatag ignore all errors, including when the post was already favorited before editing the post.
This commit is contained in:
@@ -954,6 +954,14 @@ class PostTest < ActiveSupport::TestCase
|
||||
@post.update(tag_string: "aaa -fav:self")
|
||||
assert_equal("", @post.fav_string)
|
||||
end
|
||||
|
||||
should "not fail when the fav: metatag is used twice" do
|
||||
@post.update(tag_string: "aaa fav:self fav:me")
|
||||
assert_equal("fav:#{@user.id}", @post.fav_string)
|
||||
|
||||
@post.update(tag_string: "aaa -fav:self -fav:me")
|
||||
assert_equal("", @post.fav_string)
|
||||
end
|
||||
end
|
||||
|
||||
context "for a child" do
|
||||
|
||||
Reference in New Issue
Block a user