Fix the actual failing test

This commit is contained in:
Jeff Wong 2019-11-14 16:20:45 -08:00
parent 25dd045ba5
commit 40d14ba166
2 changed files with 1 additions and 2 deletions

View File

@ -12,7 +12,7 @@ describe ReviewableFlaggedPostSerializer do
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 eq(p0.cooked) expect(json[:cooked]).to eq(p0.cooked)
expect(json[:raw]).to eq(p0.raw) expect(json[:raw]).to eq(p0.raw)
expect(json[:target_url]).to eq(p0.url) expect(json[:target_url]).to eq(Discourse.base_url + p0.url)
end end
it "works when the topic is deleted" do it "works when the topic is deleted" do

View File

@ -35,7 +35,6 @@ describe ReviewableSerializer do
describe "urls" do describe "urls" do
it "links to the flagged post" do it "links to the flagged post" do
Discourse.stubs(:base_url).returns("http://test.localhost/subfolder")
fp = Fabricate(:reviewable_flagged_post) fp = Fabricate(:reviewable_flagged_post)
json = described_class.new(fp, scope: Guardian.new(admin), root: nil).as_json json = described_class.new(fp, scope: Guardian.new(admin), root: nil).as_json
expect(json[:target_url]).to eq(Discourse.base_url + fp.post.url) expect(json[:target_url]).to eq(Discourse.base_url + fp.post.url)