policies: fix champ policy for guest users
This commit is contained in:
parent
c17ceb4440
commit
059e11601b
2 changed files with 21 additions and 1 deletions
|
@ -35,6 +35,14 @@ describe ChampPolicy do
|
|||
it_behaves_like 'they can’t access a private champ'
|
||||
end
|
||||
|
||||
context 'as a person invited on the dossier' do
|
||||
let(:invite) { create(:invite, :with_user, dossier: dossier) }
|
||||
let(:signed_in_user) { invite.user }
|
||||
|
||||
it_behaves_like 'they can access a public champ'
|
||||
it_behaves_like 'they can’t access a private champ'
|
||||
end
|
||||
|
||||
context 'as another user' do
|
||||
let(:signed_in_user) { create(:user) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue