diff options
| author | Alban Peignier | 2018-02-22 12:16:28 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2018-02-22 12:16:28 +0100 | 
| commit | 643c5887c00e88e56c498e642b1c663649a36039 (patch) | |
| tree | 252f139d2862e6a91eb35ae5abe6e20596b3e891 /spec/support | |
| parent | caa24bf7e89d9595f95156433638a9cb1e6df36f (diff) | |
| download | chouette-core-643c5887c00e88e56c498e642b1c663649a36039.tar.bz2 | |
Prevent error when PunditViewPolicy try to find undefined features5938-locale-selector
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/pundit/pundit_view_policy.rb | 2 | 
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 | 
