Fix the actual failing test
This commit is contained in:
parent
25dd045ba5
commit
40d14ba166
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue