flags/appeals: replace is_resolved flag with statuses.

Replace references to the `is_resolved` field with the `status` field.
Post flags were marked as resolved when a post was approved (but not
when the post was deleted because it went unapproved). The status field
supercedes the resolved field.
This commit is contained in:
evazion
2020-08-07 18:53:25 -05:00
parent 2b0cd3c90b
commit 3a17b5a13e
14 changed files with 33 additions and 54 deletions

View File

@@ -8,10 +8,10 @@ class PostEventsControllerTest < ActionDispatch::IntegrationTest
end
as(@user) do
@post = create(:post)
@post.flag!("aaa")
@post = create(:post, is_flagged: true)
create(:post_flag, post: @post, status: :rejected)
@post.update(is_deleted: true)
create(:post_appeal, post: @post)
create(:post_appeal, post: @post, status: :succeeded)
@post.approve!(@mod)
end
end
@@ -38,9 +38,5 @@ class PostEventsControllerTest < ActionDispatch::IntegrationTest
should "render" do
assert_not_nil(@appeal)
end
should "return is_resolved correctly" do
assert_equal(false, @appeal["is_resolved"])
end
end
end