Skip to content

Commit

Permalink
Adjust from keyword arguments to options hash expectation in insert_t…
Browse files Browse the repository at this point in the history
…ickets_spec
  • Loading branch information
wwahammy committed Sep 3, 2024
1 parent 24c5d3e commit bb9e548
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/legacy_lib/insert/insert_tickets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def success_expectations
expect(Houdini.event_publisher).to receive(:announce).with(:trx_assignment_created, any_args).ordered
expect(Houdini.event_publisher).to receive(:announce).with(:transaction_created, any_args).ordered
result = InsertTickets.create(tickets: [{ quantity: 1, ticket_level_id: ticket_level.id }], nonprofit_id: nonprofit.id, supporter_id: supporter.id, token: source_token.token, event_id: event.id, kind: 'offsite', offsite_payment: { kind: 'check', check_number: 'fake_checknumber' }, current_user: user)

expected = generate_expected_tickets(payment_id: result['payment'].id,
nonprofit: nonprofit,
supporter: supporter,
Expand Down Expand Up @@ -391,7 +391,7 @@ def success(other_elements = {})
success_expectations
expect(Houdini.event_publisher).to receive(:announce).with(:ticket_level_created, any_args).twice
expect(Houdini.event_publisher).to receive(:announce).with(:event_discount_created, any_args)

expect(Houdini.event_publisher).to receive(:announce).with(:stripe_transaction_charge_created, any_args).ordered
expect(Houdini.event_publisher).to receive(:announce).with(:payment_created, any_args).ordered
expect(Houdini.event_publisher).to receive(:announce).with(:stripe_transaction_created, any_args).ordered
Expand Down Expand Up @@ -421,7 +421,7 @@ def success(other_elements = {})
currency: 'usd',
description: 'Tickets The event of Wonders',
statement_descriptor: 'Tickets The event of W',
metadata: { kind: 'Ticket', event_id: event.id, nonprofit_id: nonprofit.id } }, stripe_account: nonprofit.stripe_account_id).and_wrap_original { |m, *args|
metadata: { kind: 'Ticket', event_id: event.id, nonprofit_id: nonprofit.id } }, {stripe_account: nonprofit.stripe_account_id}).and_wrap_original { |m, *args|
a = m.call(*args)
stripe_charge_id = a['id']
a
Expand Down

0 comments on commit bb9e548

Please sign in to comment.