Sha256: bb6c52b0abbc22bd4028d17998ad65d70d9ac2db8ad89c224301886afa491cb3
Contents?: true
Size: 542 Bytes
Versions: 4
Compression:
Stored size: 542 Bytes
Contents
# frozen_string_literal: true require 'test_plugin_helper' module ForemanWebhooks class DeliverWebhookJobTest < ActiveJob::TestCase let(:webhook) { FactoryBot.create(:webhook) } let(:job) do ::ForemanWebhooks::DeliverWebhookJob.new(event_name: 'subnet_created', payload: { id: 2 }, webhook_id: webhook.id) end it 'executes the webhook service' do result = { status: :success } ::ForemanWebhooks::WebhookService.any_instance.expects(:execute).once.returns(result) job.perform_now end end end
Version data entries
4 entries across 4 versions & 1 rubygems