From 8d060e887ee8d4aa4074461039c9b0fc463bde62 Mon Sep 17 00:00:00 2001 From: Kosmatoff Date: Mon, 25 Dec 2023 00:17:43 +0300 Subject: [PATCH] test getfeed fix --- .../microservices/transaction/delivery/http/handlers_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/microservices/transaction/delivery/http/handlers_test.go b/internal/microservices/transaction/delivery/http/handlers_test.go index d765141..43baad3 100644 --- a/internal/microservices/transaction/delivery/http/handlers_test.go +++ b/internal/microservices/transaction/delivery/http/handlers_test.go @@ -108,7 +108,7 @@ func TestHandler_GetFeed(t *testing.T) { user: user, queryParam: "page=2&page_size=10", expectedCode: http.StatusOK, - expectedBody: `{"status":200,"body":{"transactions":[{"id":"00000000-0000-0000-0000-000000000000","account_income":"00000000-0000-0000-0000-000000000000","account_outcome":"00000000-0000-0000-0000-000000000000","income":0,"outcome":0,"date":"0001-01-01T00:00:00Z","payer":"","description":"","categories":null}]}}`, + expectedBody: `{"status":200,"body":{"transactions":[{"id":"00000000-0000-0000-0000-000000000000","account_income":"00000000-0000-0000-0000-000000000000","account_outcome":"00000000-0000-0000-0000-000000000000","income":0,"user_id":"` + user.ID.String() + `","outcome":0,"date":"0001-01-01T00:00:00Z","payer":"","description":"","categories":null}]}}`, mockUsecaseFn: func(mockUsecase *mocks.MockUsecase) { mockUsecase.EXPECT().GetFeed(gomock.Any(), gomock.Any(), gomock.Any()).Return([]models.Transaction{{UserID: uuidTest}}, nil) },