mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 20:24:43 +08:00
14 lines
394 B
Ruby
14 lines
394 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe Activities::SendWebhookJob do
|
|
let!(:webhook) { create :webhook }
|
|
let!(:activity) { create :activity }
|
|
|
|
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
|