Skip to content

Commit

Permalink
fixed test case
Browse files Browse the repository at this point in the history
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
  • Loading branch information
eckelj committed Jun 20, 2024
1 parent e057cda commit 9c009f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion service/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (s *TAAService) createAccount(c *gin.Context) {
err = s.pmc.FundAccount(requestBody.PlmntAddress)
if err != nil {
s.logger.Error("msg", "failed to send funds ", "address", requestBody.PlmntAddress, "error", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
c.JSON(http.StatusInternalServerError, gin.H{"error": "failed to send funds: " + err.Error()})
return
}

Expand Down
2 changes: 1 addition & 1 deletion service/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestPostCreateAccount(t *testing.T) {
Signature: "DE97AEF2A99B9371882C4639A607A11AF2BA8AE520FF7B28203193F5EB63AE1670D431960C3103682901A8F5B3C542139DCF8FB44F97780FC8D8A45F8A4E59E3",
PlmntAddress: "otherPlmntAddr",
},
resBody: "{\"error\":\"failed to send funds\"}",
resBody: "{\"error\":\"failed to send funds: some err\"}",
code: 500,
mocker: func(t *testing.T) *testutil.MockIPlanetmintClient {
ctrl := gomock.NewController(t)
Expand Down

0 comments on commit 9c009f9

Please sign in to comment.