Skip to content

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

Test creating staff memeber from customer

Anna Siwik4661035f698b
diff --git a/tests/dashboard/test_staff.py b/tests/dashboard/test_staff.py
index 02b7a8a985..6d2f530d54 100644
--- a/tests/dashboard/test_staff.py
+++ b/tests/dashboard/test_staff.py
@@ -111,3 +111,11 @@ def test_create_staff_and_set_password(admin_client, staff_group):
assert response['Location'] == reverse('account_reset_password_complete')
new_user = User.objects.get(email='[email protected]')
assert new_user.has_usable_password()
+
+
+def test_create_staff_from_customer(admin_client, staff_group, customer_user):
+ url = reverse('dashboard:staff-create')
+ data = {'email': customer_user.email, 'groups': staff_group.pk}
+ admin_client.post(url, data)
+ customer_user.refresh_from_db()
+ assert customer_user.is_staff