From 87775ac0c64d4d1e527da8803190855b5a0c5bee Mon Sep 17 00:00:00 2001 From: gouravmpk Date: Tue, 27 Feb 2024 14:50:24 +0530 Subject: [PATCH] change http url req --- handlers/bounty_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/bounty_test.go b/handlers/bounty_test.go index 40df7ac2a..ca3617c18 100644 --- a/handlers/bounty_test.go +++ b/handlers/bounty_test.go @@ -887,7 +887,7 @@ func TestGetBountyIndexById(t *testing.T) { rctx := chi.NewRouteContext() rctx.URLParams.Add("bountyId", strconv.Itoa(int(bounty.ID))) - req, err := http.NewRequestWithContext(context.WithValue(context.Background(), chi.RouteCtxKey, rctx), http.MethodGet, "/index/1", nil) + req, err := http.NewRequestWithContext(context.WithValue(context.Background(), chi.RouteCtxKey, rctx), http.MethodGet, "gobounties/index/1", nil) assert.NoError(t, err) mockDb.On("GetBountyIndexById", "1").Return(int64(12), nil).Once() @@ -912,7 +912,7 @@ func TestGetBountyIndexById(t *testing.T) { bountyID := "" rctx := chi.NewRouteContext() rctx.URLParams.Add("bountyId", bountyID) - req, err := http.NewRequestWithContext(context.WithValue(context.Background(), chi.RouteCtxKey, rctx), http.MethodGet, "/index/"+bountyID, nil) + req, err := http.NewRequestWithContext(context.WithValue(context.Background(), chi.RouteCtxKey, rctx), http.MethodGet, "gobounties/index/"+bountyID, nil) assert.NoError(t, err) mockDb.On("GetBountyIndexById", bountyID).Return(int64(0), fmt.Errorf("bounty not found")).Once() @@ -1035,7 +1035,7 @@ func TestGetAllBounties(t *testing.T) { } rctx := chi.NewRouteContext() - req, _ := http.NewRequestWithContext(context.WithValue(context.Background(), chi.RouteCtxKey, rctx), http.MethodGet, "/all", nil) + req, _ := http.NewRequestWithContext(context.WithValue(context.Background(), chi.RouteCtxKey, rctx), http.MethodGet, "gobounties/all", nil) mockDb.On("GetAllBounties", req).Return(bounties) mockDb.On("GetPersonByPubkey", mock.Anything).Return(db.Person{}, nil)