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

PerseveranceScraper test failing #146

Closed
mtilda opened this issue Apr 9, 2021 · 0 comments
Closed

PerseveranceScraper test failing #146

mtilda opened this issue Apr 9, 2021 · 0 comments

Comments

@mtilda
Copy link

mtilda commented Apr 9, 2021

PerseveranceScraper.scrape should create photo objects currently fails. The RSpec output is below:

$ bundle exec rspec
 
Randomized with seed 50175
F......................................................

Failures:

  1) PerseveranceScraper.scrape should create photo objects
     Failure/Error: expect{ scraper.scrape }.to change { Photo.count }.by(205)
       expected `Photo.count` to have changed by 205, but was changed by 34
     # ./spec/models/perseverance_scraper_spec.rb:41:in `block (3 levels) in <top (required)>'

Finished in 2.15 seconds (files took 1.56 seconds to load)
55 examples, 1 failure

Failed examples:

rspec ./spec/models/perseverance_scraper_spec.rb:38 # PerseveranceScraper.scrape should create photo objects

Randomized with seed 50175

Coverage report generated for RSpec to /home/mxkay/Projects/MarsPhotoAPI/mars-photo-api/coverage. 243 / 245 LOC (99.18%) covered.

At a glance, it actually looks like the test is incorrect. It scrapes photos from sol 1, which can be found here: https://mars.nasa.gov/rss/api/?feed=raw_images&category=mars2020&feedtype=json&sol=1

The json at that address contains 34 photo. I'm not sure why the test expects the photo count to change by 205.

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

2 participants