Skip to content

Commit 8446419

Browse files
authored
Fix 401 not found test case (#55)
1 parent 46de072 commit 8446419

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cmd/otpgateway/handlers_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,8 @@ func TestDeleteOnOTPCheck(t *testing.T) {
323323
assert.Equal(t, http.StatusOK, r.StatusCode, "verification pending")
324324

325325
// Reattempt status check
326-
r = testRequest(t, http.MethodDelete, "/api/otp/"+dummyOTPID+"/status", nil, &out)
327-
assert.Equal(t, http.StatusGone, r.StatusCode, "otp not found returns 410")
328-
assert.Equal(t, "OTP has expired or doesn't exist", out.Message, "deleted OTP passed")
326+
r = testRequest(t, http.MethodDelete, "/api/otp/"+dummyOTPID+"/status", nil, &data)
327+
assert.Equal(t, http.StatusBadRequest, r.StatusCode, "otp not found")
329328
}
330329

331330
func testRequest(t *testing.T, method, path string, p url.Values, out interface{}) *http.Response {

0 commit comments

Comments
 (0)