Optimize spec for ProcessPost job

This commit is contained in:
Arpit Jalan 2017-01-31 14:10:56 +05:30
parent 3a5c0c5605
commit a525563eea
1 changed files with 1 additions and 3 deletions

View File

@ -48,9 +48,7 @@ describe Jobs::ProcessPost do
it "always re-extracts links on post process" do
post.update_columns(raw: "sam has a blog at https://samsaffron.com")
TopicLink.destroy_all
Jobs::ProcessPost.new.execute(post_id: post.id)
expect(TopicLink.count).to eq(1)
expect { Jobs::ProcessPost.new.execute(post_id: post.id) }.to change { TopicLink.count }.by(1)
end
end