mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 15:32:26 +08:00
fix the EnsurePostUploadsExistence job spec
This commit is contained in:
parent
a385f6c48a
commit
64ec4a6a1b
|
@ -15,14 +15,12 @@ describe Jobs::EnsurePostUploadsExistence do
|
||||||
expect(field.value).to eq(upload.url)
|
expect(field.value).to eq(upload.url)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not create post custom fields' do
|
it 'should create post custom field with nil value' do
|
||||||
post = Fabricate(:post, cooked: "A sample post <a href='#{upload.url}'> <img src='#{optimized.url}'>")
|
post = Fabricate(:post, cooked: "A sample post <a href='#{upload.url}'> <img src='#{optimized.url}'>")
|
||||||
|
described_class.new.execute({})
|
||||||
expect {
|
field = PostCustomField.last
|
||||||
described_class.new.execute({})
|
expect(field.name).to eq(Jobs::EnsurePostUploadsExistence::MISSING_UPLOADS)
|
||||||
}.not_to change {
|
expect(field.value).to eq(nil)
|
||||||
PostCustomField.count
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user