Sha256: 3e5db78b767597b2dd3f1116761b2f6d02231b0a21d1294e2e4b87da800dd6ce
Contents?: true
Size: 817 Bytes
Versions: 3
Compression:
Stored size: 817 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe SolidusBolt::Webhooks::CreateService, :vcr, :bolt_configuration do describe '#call', vcr: true do subject(:create) { described_class.call(url: 'https://solidus-test.com/webhook', event: event) } context 'with an event' do let(:event) { 'payment' } it 'returns a webhook id' do expect(create).to match hash_including('webhook_id') end end context 'with "all" event' do let(:event) { 'all' } it 'returns a webhook id' do expect(create).to match hash_including('webhook_id') end end context 'with empty event' do let(:event) { '' } it 'raises a server error' do expect{ create }.to raise_error SolidusBolt::ServerError end end end end
Version data entries
3 entries across 3 versions & 1 rubygems