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
Writing tests in validationFunc can be annoying. We can consider using https://github.com/Jeffail/gabs to reduce the boilerplate.
validationFunc
The text was updated successfully, but these errors were encountered:
Tried gabs succesfully in GET with page[size] query param
GET with page[size] query param
Test code:
jsonParsed.Exists("data") assert.Equal(t, 2, len(jsonParsed.S("data").Children())) jsonParsed.Exists("links") value := jsonParsed.Path("links.prev").Data() assert.Nil(t, value) value, ok := jsonParsed.Path("links.next").Data().(string) if ok { assert.Equal(t, "?page[after]=WyIyMDE4LTA1LTE2VDAwOjAwOjAwWiIsIjQ3ODA3ZTBjLTA2MTMtNGFlYS05OTE3LTU0NTVjYzZlZGRhZCJd", value) } else { assert.FailNow(t, "Invalid links.prev.next") }
Sorry, something went wrong.
No branches or pull requests
Writing tests in
validationFunc
can be annoying. We can consider using https://github.com/Jeffail/gabs to reduce the boilerplate.The text was updated successfully, but these errors were encountered: