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

Add support for releases endpoint #126

Merged
merged 2 commits into from Jul 31, 2018
Merged

Conversation

bmulvihill
Copy link
Contributor

Closes #125

Adds support for /releases
https://www.pivotaltracker.com/help/api/rest/v5#Releases

One caveat is I am unsure how to get the test data for VCR to write the tests.

@coveralls
Copy link

coveralls commented Jul 26, 2018

Coverage Status

Coverage increased (+0.1%) to 97.077% when pulling 405311e on bmulvihill:releases into 72c51d3 on dashofcode:master.

@forest
Copy link
Contributor

forest commented Jul 31, 2018

@bmulvihill for releases you can will want to add a test for Stories#get_release and Project#releases. I think it makes sense to add the tests to the respective test files that already exist. You will see from the existing tests, like for Story#tasks that VCR.use_cassette is used to wrap the parts that make API calls. https://github.com/dashofcode/tracker_api/blob/master/test/story_test.rb#L212

VCR will record the API call and save the response. Then in subsequent test runs it will return this saved response instead of actually making the API call. To get VCR to re-record the response just delete the file with the response and it will be recreated.

When you are happy with the reponse add it to git.

@bmulvihill
Copy link
Contributor Author

bmulvihill commented Jul 31, 2018

@forest I guess my main question with the tests were which project board you using to create the test data? Or is this already handled via some configuration?

@bmulvihill
Copy link
Contributor Author

Just answered my own question :)
https://github.com/dashofcode/tracker_api/blob/master/test/minitest_helper.rb#L19-L31

@forest
Copy link
Contributor

forest commented Jul 31, 2018

Ah. The project has three for different use cases but I typically use #1.
https://github.com/dashofcode/tracker_api/blob/master/test/minitest_helper.rb#L28

You might have to login and create from releases so you have some data to query.

@forest
Copy link
Contributor

forest commented Jul 31, 2018

👍 Looks good.

@forest forest merged commit 4e08e4a into ProductPlan:master Jul 31, 2018
@bmulvihill bmulvihill deleted the releases branch July 31, 2018 18:49
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.

None yet

3 participants