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

How to handle response? #125

Closed
kopylovvlad opened this issue Jan 24, 2019 · 1 comment
Closed

How to handle response? #125

kopylovvlad opened this issue Jan 24, 2019 · 1 comment

Comments

@kopylovvlad
Copy link

Hello. Sometimes I need to check the response manually.
For example, I have an endpoint, it should return an array of objects. I want to check response size (is it more than 0?). How could I do it?

@kopylovvlad
Copy link
Author

I have found the way how to do it.

validator = validate(:get, '/deals/{id}.json', 200, params)
expect(subject).to validator
expect(validator.response_body.size).to be > 0

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