docbrown/spec/policies
Daniel Uber 9b5512bd9f
expect to forbid, rather than expect not to permit (#14390)
I noticed a warning from rspec when this policy spec ran:

        Using expect { }.not_to permit_actions could produce
        confusing results. Please use `.to forbid_actions` instead. To
        clarify, `.not_to permit_actions` will look at all of the actions and
        checks if ANY actions fail, not if all actions fail. Therefore, you
        could result in something like this:

        it { is_expected.to permit_actions([:new, :create, :edit]) }
        it { is_expected.not_to permit_actions([:edit, :destroy]) }

        In this case, edit would be true and destroy would be false, but both
        tests would pass.

I just follow the helpful advice.
2021-07-30 11:42:47 -05:00
..
admin_policy_spec.rb Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
api_secret_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
article_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
chat_channel_membership_policy_spec.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
chat_channel_policy_spec.rb [deploy] Update /ban for Connect (#9459) 2020-07-23 09:49:54 -04:00
comment_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
discussion_lock_policy_spec.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
follow_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
github_repo_policy_spec.rb Split Settings::Authentication from SiteConfig (#13095) 2021-04-12 09:41:09 +02:00
html_variant_policy_spec.rb Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
image_upload_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
internal_policy_spec.rb nothing to see here....except maybe reverting a push to master (#8308) 2020-06-05 20:34:21 -05:00
liquid_tag_policy_spec.rb [deploy] Add role and docs for user subscription liquid tag (#9170) 2020-07-08 14:07:53 -04:00
organization_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
pinned_article_policy_spec.rb expect to forbid, rather than expect not to permit (#14390) 2021-07-30 11:42:47 -05:00
reaction_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
response_template_policy_spec.rb Add response templates for internal usage (#6676) 2020-03-20 11:32:55 -04:00
stripe_active_card_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
tag_policy_spec.rb Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
user_policy_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
video_policy_spec.rb Remove harsh video restriction and add video duration (#1811) 2019-02-16 17:42:44 -04:00