mirror of
http://88.130.71.182:3000/BlitTech/badoHair_be.git
synced 2026-06-13 09:00:42 +00:00
Fix 2 broken test assertions, add 22 new tests for register flow, booking email resilience, settings, and customers
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user