diff options
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/pundit/shared_examples.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/pundit/shared_examples.rb b/spec/support/pundit/shared_examples.rb index 13f537c6d..8592ef29f 100644 --- a/spec/support/pundit/shared_examples.rb +++ b/spec/support/pundit/shared_examples.rb @@ -111,7 +111,10 @@ RSpec.shared_examples 'permitted policy and same organisation' do if archived_and_finalised it 'removes the permission for archived referentials' do user.organisation_id = referential.organisation_id - referential.archived_at = 42.seconds.ago + record.archived_at = 42.seconds.ago + record.ready = true + expect(record).to be_archived + expect(record).to be_referential_read_only expect_it.not_to permit(user_context, record) end |
