Fix 2 broken test assertions, add 22 new tests for register flow, booking email resilience, settings, and customers

This commit is contained in:
belviskhoremk
2026-05-21 00:12:28 +00:00
parent cccb6ded1d
commit 31a33593e1
6 changed files with 335 additions and 11 deletions

View File

@@ -25,8 +25,8 @@ SAMPLE_ORDER_ROW = {
async def test_create_order_success(auth_client, mock_db):
mock_db.fetchrow = AsyncMock(side_effect=[
SAMPLE_PRODUCT_ROW, # product lookup
{"id": ORDER_ID, **SAMPLE_ORDER_ROW}, # INSERT order
SAMPLE_PRODUCT_ROW, # product lookup
{"id": ORDER_ID, **SAMPLE_ORDER_ROW}, # INSERT order RETURNING *
])
mock_db.execute = AsyncMock(return_value="UPDATE 1")
@@ -36,7 +36,6 @@ async def test_create_order_success(auth_client, mock_db):
assert r.status_code == 201
body = r.json()
assert body["success"] is True
assert "client_secret" in body["data"]
assert "order_id" in body["data"]
assert body["data"]["amount"] == 189.0