Sha256: 75700c6ea42b13b1856ebd0aa17ca28c620c12d1563c366fd2463096434fe385

Contents?: true

Size: 490 Bytes

Versions: 19

Compression:

Stored size: 490 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
      ::ForemanWebhooks::WebhookService.any_instance.expects(:execute).once
      job.perform_now
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
foreman_webhooks-3.1.1 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.2.1 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.2.0 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.1.0 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.0.5 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-2.0.3 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.0.4 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-2.0.2 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.0.3 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.0.2 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.0.1 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-2.0.1 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-3.0.0 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-2.0.0 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-1.1.0 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-1.0.0 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-0.0.3 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-0.0.2 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
foreman_webhooks-0.0.1 test/jobs/foreman_webhooks/deliver_webhook_job_test.rb