Open reefdog opened 2 years ago
Update: the only remaining failures for this to work are the Could not find MediaReview in webpage
in ingest_controller_test
:
Failure:
MediaVault::IngestControllerTest#test_can_archive_multiple_MediaReview_from_a_webpage [/Users/justin/Projects/duke/zenodotus/test/controllers/media_vault/ingest_controller_test.rb:161]:
Expected response to be a <200: OK>, but was a <400: Bad Request>
Response body: {"response_code":40,"response":"Could not find MediaReview in webpage"}.
Expected: 200
Actual: 400
rails test test/controllers/media_vault/ingest_controller_test.rb:159
Failure:
MediaVault::IngestControllerTest#test_can_archive_MediaReview_from_a_webpage [/Users/justin/Projects/duke/zenodotus/test/controllers/media_vault/ingest_controller_test.rb:145]:
Expected response to be a <200: OK>, but was a <400: Bad Request>
Response body: {"response_code":40,"response":"Could not find MediaReview in webpage"}.
Expected: 200
Actual: 400
rails test test/controllers/media_vault/ingest_controller_test.rb:143
It would be nice to be able to run our tests offline, for low-bandwidth scenarios and as a target for fully mocking all our external API calls. #206 got us way down the path, but disabling internet and running tests reveals some additional gaps, of two types:
Click to view full test output
``` Error: ArchiveItemTest#test_destroying_a_user_resets_the_submitter_id_of_ArchiveItems_it_created: Birdsong::AuthorizationError: Invalid response code 0 app/media_sources/twitter_media_source.rb:60:in `retrieve_tweet' app/media_sources/twitter_media_source.rb:35:in `extract' app/models/sources/tweet.rb:47:in `create_from_url' test/models/archive_item_test.rb:17:in `block in