Skip to content

Commit

Permalink
Spec for outbox class not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagodiaz committed Oct 5, 2023
1 parent 61fe6b7 commit f6fa243
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/lib/active_outbox/outboxable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@
subject(:save_instance) { fake_model_instance.save }

context 'when record is created' do
context 'when the ActiveOutbox configuration is not set' do
before do
allow(ActiveOutbox.configuration).to receive(:outbox_mapping).and_return({ 'default' => nil })
end

include_examples 'raises an error and does not create neither the record nor the outbox record',
ActiveOutbox::OutboxClassNotFoundError
end

context 'when outbox record is created' do
let(:event) { 'FAKE_MODEL_CREATED' }

Expand Down

0 comments on commit f6fa243

Please sign in to comment.