Research and improve spec/lib/importers/revision_score_importer_spec.rb
#5854
Labels
spec/lib/importers/revision_score_importer_spec.rb
#5854
What is happening?
Specs in
spec/lib/importers/revision_score_importer_spec.rb
are not working as expected. While they'repassing in master, the generated fixtures seem suspicious. It looks like the problematic spec is
marks RevisionNotFound revisions as deleted
. The behavior is not consistent. We should research a bit more to better understand what's going on.To Reproduce
Steps to reproduce the behavior (locally):
rspec ./spec/lib/importers/revision_score_importer_spec.rb
fixtures/vcr_cassettes/revision_scores/deleted_revision.yml
. Does it exist? I couldn't find it. It looks like there is no LiftWing API request for that revision id, which doesn't make sense. However, the spec is passing.rspec ./spec/lib/importers/revision_score_importer_spec.rb
again. Now the "RevisionScoreImporter marks RevisionNotFound revisions as deleted" spec doesn't pass, due todeleted
being false.fixtures/vcr_cassettes/revision_scores/deleted_revision.yml
.After spec 7, I found the following request in my fixture file for revision 753277075. It seems that the error changed and doesn't contain "RevisionNotFound" string anymore. That would explain why the spec fails and the revision is not marked as deleted.
rspec ./spec/lib/importers/revision_score_importer_spec.rb
again. "marks TextDeleted revisions as deleted" spec is not passing.fixtures/vcr_cassettes/revision_scores/deleted_revision.yml
. I didn't find any LiftWing API request.It looks like for some reason the LiftWing API requests for revisions 708326238 and 753277075 are mixed up.
Expected behavior
spec/lib/importers/revision_score_importer_spec.rb
passThe text was updated successfully, but these errors were encountered: