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

fake vcr cassette #8

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

fake vcr cassette #8

wants to merge 2 commits into from

Conversation

maelle
Copy link
Member

@maelle maelle commented Nov 12, 2020

No description provided.

test_that("gh_organizations works", {
testthat::expect_type(gh_organizations(), "character")

testthat::expect_message(foo <- gh_organizations(), "Retrying")
Copy link
Member Author

Choose a reason for hiding this comment

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

see @sckott it's a case where I think it's easier to just wrap the whole test with use_cassette(). 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Note: when one wraps the whole test in use_cassette(), there's no straightforward way to "skip" the test.

Authorization: token af0e9f121c2b68b6957a9b325de64fe572b1fd9a
response:
status:
status_code: 502
Copy link
Member Author

Choose a reason for hiding this comment

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

so in this cassette there is first a 502 and then a 200. in the test I use expect_message to make sure I get the 502 first.

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

Successfully merging this pull request may close these issues.

2 participants