Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

[1593] Refactor announcements controller spec #1621

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

esoterik
Copy link
Collaborator

@esoterik esoterik commented Aug 8, 2016

Resolves #1593

PASSING_ROLES = [:superuser, :admin].freeze
PASSING_ROLES.each { |r| it_behaves_like 'can hide announcement', r }
FAILING_ROLES = [:checkout_person, :user, :guest, :banned].freeze
FAILING_ROLES.each { |r| it_behaves_like 'can hide announcement', r }
Copy link
Collaborator Author

@esoterik esoterik Aug 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fail due to a permissions error I have yet to fully figure out. This gets thrown to the rescue_from CanCan::AccessDenied block in ApplicationController, but when I put a binding.pry there I discovered that current_ability.can? :hide, Announcement returns true...

Might be related to the permissions error in #1612?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants