Sha256: 125b73576c4bb42db132edb68b0e521bf83a737c1d2cebf35ce96c2ce2e77144
Contents?: true
Size: 787 Bytes
Versions: 17
Compression:
Stored size: 787 Bytes
Contents
describe ActivityNotification::NotifyJob, type: :job do before do ActiveJob::Base.queue_adapter = :test ActiveJob::Base.queue_adapter.enqueued_jobs.clear @author_user = create(:confirmed_user) @user = create(:confirmed_user) @article = create(:article, user: @author_user) @comment = create(:comment, article: @article, user: @user) end describe "#perform_later" do it "generates notifications" do expect { ActivityNotification::NotifyJob.perform_later('users', @comment) }.to have_enqueued_job end it "generates notifications once" do ActivityNotification::NotifyJob.perform_later('users', @comment) expect(ActivityNotification::NotifyJob).to have_been_enqueued.exactly(:once) end end end
Version data entries
17 entries across 17 versions & 1 rubygems