docbrown/spec/models/reaction_destroy_spec.rb
Anna Buianova 8d60177d45 Remove old methods from reactions #1621 (#1924)
* Remove old methods from reactions

* Return the needed Reaction methods
2019-02-28 06:50:29 -08:00

11 lines
384 B
Ruby

require "rails_helper"
RSpec.describe Reaction, type: :model do
let(:article) { create(:article, featured: true) }
let!(:reaction) { create(:reaction, reactable: article) }
it "creates a ScoreCalcJob on article reaction destroy" do
ActiveJob::Base.queue_adapter = :test
expect { reaction.destroy }.to have_enqueued_job(Articles::ScoreCalcJob).exactly(:once)
end
end