Fakultas Ilmu Komputer UI

Commit b45528d7 authored by Glenda Emanuella Sutanto's avatar Glenda Emanuella Sutanto
Browse files

Add response in midtrans redirection

parent 232883df
......@@ -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):
nutritionist=cart.user.nutritionist
)
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