Fakultas Ilmu Komputer UI

Commit 9e4b90aa authored by Glenda Emanuella Sutanto's avatar Glenda Emanuella Sutanto
Browse files

Merge branch 'add-response-in-midtrans-redirection' into 'staging'

Add response in midtrans redirection

See merge request !67
parents 232883df b45528d7
Pipeline #77559 passed with stages
in 12 minutes
......@@ -169,6 +169,8 @@ class CartTests(APITestCase):
response = self.client.get(url, request_params)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.cart_3.transaction_status = 'pending'
self.assertEqual(response.data, CartSerializer(self.cart_3).data)
self.assertEqual(DietQuestionnaire.objects.count(), 1)
self.assertEqual(DietQuestionnaire.objects.last().user, self.cart_3.user)
self.assertEqual(DietRecommendation.objects.count(), 1)
......@@ -127,4 +127,4 @@ class MidtransRedirectionViewSet(viewsets.ViewSet):
return Response(status=status.HTTP_200_OK)
return Response(CartSerializer(cart).data, status=status.HTTP_200_OK)
Markdown is supported
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