diff options
| author | Luc Donnet | 2018-03-05 13:06:32 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2018-03-05 13:07:54 +0100 | 
| commit | 2079643848450e8415f2091836ea76190f23a717 (patch) | |
| tree | faacce559f7784e007b87da7b379479fc5c2604d | |
| parent | 272183f191ef72ec67e8e0923f6d5db9772a16c8 (diff) | |
| download | chouette-core-2079643848450e8415f2091836ea76190f23a717.tar.bz2 | |
Delete use of current_offer_workbench and replace by current_workbench Refs #4658
| -rw-r--r-- | spec/support/pundit/pundit_view_policy.rb | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/spec/support/pundit/pundit_view_policy.rb b/spec/support/pundit/pundit_view_policy.rb index 316ff6718..efe7f0f76 100644 --- a/spec/support/pundit/pundit_view_policy.rb +++ b/spec/support/pundit/pundit_view_policy.rb @@ -5,13 +5,13 @@ module Pundit        into.let(:current_referential){ referential || build_stubbed(:referential, organisation: organisation) }        into.let(:current_user){ create :user, permissions: permissions, organisation: organisation }        into.let(:pundit_user){ UserContext.new(current_user, referential: current_referential) } -      into.let(:current_offer_workbench) { create :workbench, organisation: organisation} +      into.let(:current_workbench) { create :workbench, organisation: organisation}        into.before do          allow(view).to receive(:pundit_user) { pundit_user }          allow(view).to receive(:current_user) { current_user }          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(:current_workbench).and_return(current_workbench) +        allow(view).to receive(:current_workgroup).and_return(current_workbench.workgroup)          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| | 
