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

Travis service tests from tutorial #1531

Merged
merged 4 commits into from
Mar 4, 2018
Merged

Travis service tests from tutorial #1531

merged 4 commits into from
Mar 4, 2018

Conversation

platan
Copy link
Member

@platan platan commented Feb 27, 2018

Service tests were introduced in #937 by @paulmelnikow. The tutorial is based on service tests of Travis CI, we do not have them in out codebase. Do you know why? I think it would be good idea to add them.

@shields-ci
Copy link

shields-ci commented Feb 27, 2018

Messages
📖

✨ Thanks for your contribution to Shields, @platan!

📖

Thanks for contributing to our documentation. We ❤️ our documentarians!

Generated by 🚫 dangerJS

Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment. Looking back through the history I can't see any good reason for this - it looks like probably an oversight that this wasn't included.

t.create('connection error')
.get('/foo/bar.json')
.networkOff()
.expectJSON({ name: 'build', value: 'invalid' });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we'd use 'inaccessible' for this case and 'invalid' when the response is malformed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge when this is addressed!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chris48s, great idea. @paulmelnikow done

@paulmelnikow
Copy link
Member

The first version of the tutorial was written before the service tests. I never noticed they included code for tests that weren't added to the code base!

@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Mar 4, 2018
@platan
Copy link
Member Author

platan commented Mar 4, 2018

In the next PR I would like to use great checkErrorResponse function in the code handling Travis badge and in the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants