Skip to content

Commit

Permalink
fix: backend unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
johzchen committed Mar 9, 2021
1 parent bf7f6dc commit 00dbcda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/internal/handler/route/route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1270,11 +1270,11 @@ func TestRoute_Update(t *testing.T) {
},
mockErr: fmt.Errorf("route update error"),
wantErr: fmt.Errorf("route update error"),
wantRet: &data.SpecCodeResponse{StatusCode: http.StatusBadRequest},
wantRet: &data.SpecCodeResponse{StatusCode: http.StatusInternalServerError},
serviceRet: "service",
upstreamRet: "upstream",
serviceInput: "s1",
called: false,
called: true,
},
}

Expand All @@ -1300,7 +1300,7 @@ func TestRoute_Update(t *testing.T) {
Rows: returnData,
TotalSize: len(returnData),
}
}, tc.mockErr)
}, nil)

routeStore.On("Update", mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
getCalled = true
Expand Down

0 comments on commit 00dbcda

Please sign in to comment.