docbrown/spec
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
..
black_box Add more variation to home feed (#4069) 2019-09-19 12:58:11 -07:00
decorators
factories Use a bigger sample for badges titles (#4334) 2019-10-09 13:13:26 -04:00
fixtures Validates Article's published_at (#4140) 2019-10-01 15:57:36 -04:00
helpers Replace ^ and $ with \A and \z in Ruby regexps (#4072) 2019-09-20 10:28:34 -04:00
jobs Fix broken job specs (#4281) 2019-10-09 16:05:32 -04:00
labor Fix invalid anchored links due to "//" prefix. (#4340) 2019-10-09 13:57:58 -04:00
lib
liquid_tags Add Asciinema Liquid tag (#4152) 2019-10-02 11:39:19 -04:00
mailers Pro: memberships (#3461) 2019-09-24 10:38:54 -07:00
models Fix how white space is detected in frontmatter (#4265) 2019-10-08 16:53:10 -04:00
observers
policies Create scoped policy for internal/comment (#4311) 2019-10-08 12:33:59 -04:00
requests Add mod_roundrobin_notifications to user_policy.rb (#4226) [ci skip] 2019-10-08 13:52:20 -04:00
routing
services Fix invalid body_markdown in article with video (#4258) [ci skip] 2019-10-08 15:41:44 -04:00
support Fix medium liquid tags scraping (#3485) (#4120) 2019-10-01 10:29:25 -04:00
system Feat: #3498 Display episode's published_at (#4272) 2019-10-08 17:06:46 -04:00
views Improve test speed (#3957) [ci skip] 2019-09-12 16:17:20 -04:00
rails_helper.rb
spec_helper.rb