Skip to content
New issue

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

Non-string assertions are broken #92

Closed
wI2L opened this issue Oct 17, 2017 · 1 comment
Closed

Non-string assertions are broken #92

wI2L opened this issue Oct 17, 2017 · 1 comment

Comments

@wI2L
Copy link
Collaborator

wI2L commented Oct 17, 2017

Because the type ExecutorResult is a map[string]string under the hood, the assertions that expect numeric, boolean, struct.. types are broken.

For example:

assertion: result.bodyjson.__len__ ShouldBeGreaterThanOrEqualTo '8' Expected '17' to be greater than or equal to '8' (but it wasn't)!

Moreover, some assertions like ShouldContainKey which expect a struct as its first argument is basically unusable since the package github.com/fsamin/go-dump does not dump the root element of a JSON node:

result.bodyjson.bodyjson0 ShouldContainKey field_name
key 'result.bodyjson.bodyjson0' does not exist in result of executor
@wI2L
Copy link
Collaborator Author

wI2L commented Oct 17, 2017

assertion: result.bodyjson.created_at ShouldHappenAfter 2017-10-17T11:31:31Z You must provide time instances as arguments to this assertion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant