Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add test for dashboard order search with user

Jakub Draganekb235ecad558b
diff --git a/tests/test_postgresql_search.py b/tests/test_postgresql_search.py
index 0d59c8c22d..78a901a03f 100644
--- a/tests/test_postgresql_search.py
+++ b/tests/test_postgresql_search.py
@@ -141,3 +141,14 @@ def test_find_order_with_email(admin_client, orders_with_addresses, phrase,
_, orders, _ = search_dashboard(admin_client, phrase)
assert 1 == len(orders)
assert orders_with_addresses[order_num] in orders
+
+
[email protected]_db(transaction=True)
[email protected]('phrase,order_num', [('knop', 0), ('ZIEMniak', 1),
+ ('john', 2), ('ANDREAS', 0)])
+def test_find_order_with_user(admin_client, orders_with_addresses, phrase,
+ order_num):
+ _, orders, _ = search_dashboard(admin_client, phrase)
+ assert 1 == len(orders)
+ assert orders_with_addresses[order_num] in orders