Sha256: 0e99104a9a984f16b43d823f99a441679984b9efb666f0ace12cbc4a073cbab4

Contents?: true

Size: 381 Bytes

Versions: 4

Compression:

Stored size: 381 Bytes

Contents

require 'spec_helper'

RSpec.describe Spree::Webhook do
  describe '.find' do
    before { SolidusWebhooks.config.register_webhook_handler :foo, ->(payload) {} }

    it 'can find a registered handler' do
      expect(described_class.find(:foo)).to be_a(described_class)
      expect{ described_class.find(:bar) }.to raise_error(SolidusWebhooks::WebhookNotFound)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_webhooks-0.4.2 spec/models/spree/webhook_spec.rb
solidus_webhooks-0.4.1 spec/models/spree/webhook_spec.rb
solidus_webhooks-0.4.0 spec/models/spree/webhook_spec.rb
solidus_webhooks-0.3.0 spec/models/spree/webhook_spec.rb