Skip to content

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

Add test for dashboard user search with name

Jakub Draganek87b21a78d2cb
diff --git a/tests/test_postgresql_search.py b/tests/test_postgresql_search.py
index 18ddefff72..97c2d62a8d 100644
--- a/tests/test_postgresql_search.py
+++ b/tests/test_postgresql_search.py
@@ -180,3 +180,15 @@ def test_find_user_with_email(admin_client, users_with_addresses, phrase,
_, _, users = search_dashboard(admin_client, phrase)
assert 1 == len(users)
assert users_with_addresses[user_num] in users
+
+
[email protected]_db(transaction=True)
[email protected]('phrase,user_num', [('Andreas Knop', 0),
+ (' Euzebiusz ', 1),
+ ('DOE', 2)])
+def test_find_user_with_name(admin_client, users_with_addresses, phrase,
+ user_num):
+ _, _, users = search_dashboard(admin_client, phrase)
+ assert 1 == len(users)
+ assert users_with_addresses[user_num] in users