Fakultas Ilmu Komputer UI

Commit 101c3182 authored by rayhan muzakki's avatar rayhan muzakki
Browse files

[RED] added test for order

parent 57d19d3c
......@@ -757,6 +757,30 @@ class UserTest(rest_framework_test.APITestCase):
)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_user_transactionsort_list_success(self):
response = request(
'GET',
'user-list-sorttransaction',
http_authorization=self.superuser_http_authorization
)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_user_cashsort_list_success(self):
response = request(
'GET',
'user-list-sortcash',
http_authorization=self.superuser_http_authorization
)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_user_goodssort_list_success(self):
response = request(
'GET',
'user-list-sortgoods',
http_authorization=self.superuser_http_authorization
)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_user_detail_success(self):
response = request(
'GET',
......
......@@ -52,6 +52,7 @@ urlpatterns = [
),
urls.path('users/', api_views.UserList.as_view(), name='user-list'),
urls.path('users/<str:pk>/', api_views.UserDetail.as_view(), name='user-detail'),
urls.path(
'bank-account-transfer-destinations/',
......
......@@ -500,6 +500,7 @@ class UserList(generics.ListCreateAPIView):
serializer_class = api_serializers.UserSerializer
class UserDetail(generics.RetrieveUpdateDestroyAPIView):
permission_classes = [
api_permissions.IsAdminUserOrSelf,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment