scinote-web/spec/jobs/activities/send_webhook_job_spec.rb

15 lines
392 B
Ruby
Raw Normal View History

2021-06-17 20:54:30 +08:00
# frozen_string_literal: true
require 'rails_helper'
describe Activities::SendWebhookJob do
let(:webhook) { create :webhook }
let(:activity) { create :activity }
2021-06-17 20:54:30 +08:00
it 'sends the webhook' do
stub_request(:post, webhook.url).to_return(status: 200, body: "", headers: {})
expect(Activities::SendWebhookJob.new(webhook, activity).perform_now.response.code).to eq("200")
end
end