mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
DEV: correct fragile test
This test would fail sometimes if for some reason topic id 1 was in the db No reason to pretend here, this only makes for a fragile test suite.
This commit is contained in:
@ -301,7 +301,7 @@ describe CookedPostProcessor do
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Fake a loading image
|
# Fake a loading image
|
||||||
optimized_image = OptimizedImage.create!(
|
_optimized_image = OptimizedImage.create!(
|
||||||
url: '/uploads/default/10x10.png',
|
url: '/uploads/default/10x10.png',
|
||||||
width: CookedPostProcessor::LOADING_SIZE,
|
width: CookedPostProcessor::LOADING_SIZE,
|
||||||
height: CookedPostProcessor::LOADING_SIZE,
|
height: CookedPostProcessor::LOADING_SIZE,
|
||||||
@ -629,8 +629,7 @@ describe CookedPostProcessor do
|
|||||||
end
|
end
|
||||||
|
|
||||||
context "topic image" do
|
context "topic image" do
|
||||||
let(:topic) { build(:topic, id: 1) }
|
let(:post) { Fabricate(:post_with_uploaded_image) }
|
||||||
let(:post) { Fabricate(:post_with_uploaded_image, topic: topic) }
|
|
||||||
let(:cpp) { CookedPostProcessor.new(post) }
|
let(:cpp) { CookedPostProcessor.new(post) }
|
||||||
|
|
||||||
it "adds a topic image if there's one in the first post" do
|
it "adds a topic image if there's one in the first post" do
|
||||||
|
Reference in New Issue
Block a user