Optimize spec for ProcessPost job
This commit is contained in:
parent
3a5c0c5605
commit
a525563eea
|
@ -48,9 +48,7 @@ describe Jobs::ProcessPost do
|
||||||
|
|
||||||
it "always re-extracts links on post process" do
|
it "always re-extracts links on post process" do
|
||||||
post.update_columns(raw: "sam has a blog at https://samsaffron.com")
|
post.update_columns(raw: "sam has a blog at https://samsaffron.com")
|
||||||
TopicLink.destroy_all
|
expect { Jobs::ProcessPost.new.execute(post_id: post.id) }.to change { TopicLink.count }.by(1)
|
||||||
Jobs::ProcessPost.new.execute(post_id: post.id)
|
|
||||||
expect(TopicLink.count).to eq(1)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue