mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 22:23:00 +08:00
DEV: Refactor test to assert for actual content.
The other assertion is already asserting for `Post#url` and I think it makes the test clearer here.
This commit is contained in:
parent
aa2311a7b0
commit
a2e6a8a51e
|
@ -8,8 +8,8 @@ describe ReviewableFlaggedPostSerializer do
|
||||||
p0 = Fabricate(:post)
|
p0 = Fabricate(:post)
|
||||||
reviewable = PostActionCreator.spam(Fabricate(:user), p0).reviewable
|
reviewable = PostActionCreator.spam(Fabricate(:user), p0).reviewable
|
||||||
json = ReviewableFlaggedPostSerializer.new(reviewable, scope: Guardian.new(admin), root: nil).as_json
|
json = ReviewableFlaggedPostSerializer.new(reviewable, scope: Guardian.new(admin), root: nil).as_json
|
||||||
expect(json[:cooked]).to be_present
|
expect(json[:cooked]).to eq(p0.cooked)
|
||||||
expect(json[:raw]).to be_present
|
expect(json[:raw]).to eq(p0.raw)
|
||||||
expect(json[:topic_url]).to eq(p0.url)
|
expect(json[:topic_url]).to eq(p0.url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user