Skip to content

Commit

Permalink
fix: fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
subomi committed Jun 23, 2024
1 parent a3de7a8 commit 923c755
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions requestmigrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (c *createUserResponseCombineNamesMigration) Migrate(

func createUser(t *testing.T, rm *RequestMigration) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
err, res, rollback := rm.Migrate(r, "createUser")
err, vw, rollback := rm.Migrate(r, "createUser")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -159,7 +159,7 @@ func createUser(t *testing.T, rm *RequestMigration) http.Handler {
t.Fatal(err)
}

res.SetBody(body)
vw.Write(body)
})
}

Expand Down Expand Up @@ -251,7 +251,7 @@ func Test_VersionRequest(t *testing.T) {

func getUser(t *testing.T, rm *RequestMigration) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
err, res, rollback := rm.Migrate(r, "getUser")
err, vw, rollback := rm.Migrate(r, "getUser")
if err != nil {
t.Fatal(err)
}
Expand All @@ -268,7 +268,7 @@ func getUser(t *testing.T, rm *RequestMigration) http.Handler {
t.Fatal(err)
}

res.SetBody(body)
vw.Write(body)
})
}

Expand Down

0 comments on commit 923c755

Please sign in to comment.