We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a new test is added to the transaction api:
func create400(sd apitest.SeedData) []apitest.Table { table := []apitest.Table{ { Name: "basic", URL: "/v1/tranexample", Token: sd.Admins[0].Token, Method: http.MethodPost, StatusCode: http.StatusBadRequest, Input: &tranapp.NewTran{ Product: tranapp.NewProduct{ Quantity: 10, }, User: tranapp.NewUser{ Name: "Bill Kennedy", Email: "bill@ardanlabs.com", Roles: []string{"ADMIN"}, Department: "IT", Password: "123", PasswordConfirm: "123", }, }, GotResp: &tranapp.Product{}, ExpResp: nil, //TODO, CmpFunc: func(got any, exp any) string { return nil // TODO }, }, } return table }
The error that transaction.go sends is a 500 error, overriding the 400 from the validation. See transaction.go, line 40
PS.: Sorry, can't get format to behave.
The text was updated successfully, but these errors were encountered:
I can reproduce this. Transactions have created all sort of chaos. I am looking into this now. THANKS
Sorry, something went wrong.
Ok, I just pushed a fix. This was a great catch.
No branches or pull requests
If a new test is added to the transaction api:
func create400(sd apitest.SeedData) []apitest.Table { table := []apitest.Table{ { Name: "basic", URL: "/v1/tranexample", Token: sd.Admins[0].Token, Method: http.MethodPost, StatusCode: http.StatusBadRequest, Input: &tranapp.NewTran{ Product: tranapp.NewProduct{ Quantity: 10, }, User: tranapp.NewUser{ Name: "Bill Kennedy", Email: "bill@ardanlabs.com", Roles: []string{"ADMIN"}, Department: "IT", Password: "123", PasswordConfirm: "123", }, }, GotResp: &tranapp.Product{}, ExpResp: nil, //TODO, CmpFunc: func(got any, exp any) string { return nil // TODO }, }, } return table }
The error that transaction.go sends is a 500 error, overriding the 400 from the validation.
See transaction.go, line 40
PS.: Sorry, can't get format to behave.
The text was updated successfully, but these errors were encountered: