docbrown/spec/jobs/comments
Austen Madden ae22dc93a9 Fix broken job specs (#4281)
* Fix broken job specs

Many job specs were putting their assertions inside a block provided to
ActiveJob's perform_now. Unfortunately, this syntax does not error and
simply ignores the provided block.

The tests were therefore not executing their assertions. As a result
many of them were actually broken to begin with. Many used incorrect
stubbing, were trying to stub instances of models that wouldn't actually
be returned by ActiveRecord queries, etc.

This commit fixes the syntax and does it's best to fix the tests. Many
of these assertions/spec could use more TLC, but this work at least gets
them passing/executing.

* Avoid time comparison precision issues

* Implement review feedback

Adds negative test cases for when record is not found/nil. Also some
formatting changes as I was paying more attention to the rubocop setup
now.

* Add without article context to job spec

* Remove unused lets
2019-10-09 16:05:32 -04:00
..
bust_cache_job_spec.rb Fix comment deletion bug (#3732) 2019-08-27 17:07:09 -04:00
calculate_score_job_spec.rb Fix broken job specs (#4281) 2019-10-09 16:05:32 -04:00
create_first_reaction_job_spec.rb Extract comment's async methods to jobs (#2596) 2019-05-01 13:59:50 -04:00
create_id_code_job_spec.rb Fix broken job specs (#4281) 2019-10-09 16:05:32 -04:00
send_email_notification_job_spec.rb Fix broken job specs (#4281) 2019-10-09 16:05:32 -04:00
touch_user_job_spec.rb Fix broken job specs (#4281) 2019-10-09 16:05:32 -04:00