seek
seek copied to clipboard
PopulateTemplatesJobTest fails silently
Describe the bug When running the PopulateTemplatesJobTest the test passes, although an exception is raised due to no .json file containing templates to be extracted is found. The error message is printed to the console.
$ bundle exec rails test test/unit/jobs/populate_templates_job_test.rb
# Running tests with run options --seed 7841:
<ul><li>Make sure to upload files that have the ".json" extension.</li></ul>
.
Finished tests in 0.287621s, 3.4768 tests/s, 0.0000 assertions/s.
Slowest tests:
0.281191s test_perform#PopulateTemplatesJobTest
1 tests, 0 assertions, 0 failures, 0 errors, 0 skips
Expected behavior
The test should fail, since an exception is raised by Seek::IsaTemplates::TemplateExtractor.extract_templates
.
Moreover, the test should probably be extended using an example template.json
file to actually test the functionality (instead of exiting when no files are found).