aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/support/pundit/pundit_view_policy.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/pundit/pundit_view_policy.rb b/spec/support/pundit/pundit_view_policy.rb
index 63970de02..316ff6718 100644
--- a/spec/support/pundit/pundit_view_policy.rb
+++ b/spec/support/pundit/pundit_view_policy.rb
@@ -12,7 +12,7 @@ module Pundit
allow(view).to receive(:current_organisation).and_return(organisation)
allow(view).to receive(:current_offer_workbench).and_return(current_offer_workbench)
allow(view).to receive(:current_workgroup).and_return(current_offer_workbench.workgroup)
- allow(view).to receive(:has_feature?){ |f| features.include?(f)}
+ allow(view).to receive(:has_feature?){ |f| respond_to?(:features) && features.include?(f)}
allow(view).to receive(:user_signed_in?).and_return true
allow(view).to receive(:policy) do |instance|
::Pundit.policy pundit_user, instance