Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve unaddressed nits in #703 #707

Merged
merged 7 commits into from
Jul 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add transaction record test
  • Loading branch information
Porcupine1 committed Jun 20, 2024
commit 7015328048f69796ab70429214723f981c5c121b
13 changes: 11 additions & 2 deletions backend/tests/clubs/test_ticketing.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,14 +992,17 @@ def test_give_tickets(self):
"billTo": {
"firstName": self.user1.first_name,
"lastName": self.user1.last_name,
"phoneNumber": None,
"phoneNumber": "3021239234",
"email": self.user1.email,
},
}

TicketViewSet._place_hold_on_tickets(self.user1, cart.tickets)
TicketViewSet._give_tickets(
self.user1, order_info, cart, reconciliation_id=None
self.user1,
order_info,
cart,
reconciliation_id=MockPaymentResponse().reconciliation_id,
)

# Check that tickets are assigned their owner
Expand All @@ -1010,6 +1013,12 @@ def test_give_tickets(self):
# Check that the cart is empty
self.assertEqual(0, cart.tickets.count())

# Transaction record created
Porcupine1 marked this conversation as resolved.
Show resolved Hide resolved
record_exists = TicketTransactionRecord.objects.filter(
reconciliation_id=MockPaymentResponse().reconciliation_id
).exists()
self.assertTrue(record_exists)

def test_initiate_checkout_non_free_tickets(self):
self.client.login(username=self.user1.username, password="test")

Expand Down
Loading