aboutsummaryrefslogtreecommitdiffstats
path: root/spec/helpers
diff options
context:
space:
mode:
authorTeddy Wing2017-06-15 12:07:51 +0200
committerTeddy Wing2017-06-15 12:07:51 +0200
commit670b3b9a4be43bd6aea1d198cfe39f158ec1187f (patch)
tree8fd2fa2dcad911fda84003e9271c0cc6256f815e /spec/helpers
parent77228f4b959ff316b5f138c50f2c3b54c75ef115 (diff)
downloadchouette-core-670b3b9a4be43bd6aea1d198cfe39f158ec1187f.tar.bz2
TableBuilder spec: Update `current_referential` mock
We're now using the `current_referential` method in `TableBuilderHelper::URL` instead of in `TableBuilderHelper`. Thus it couldn't get `current_referential` and caused an error. Move the mock to `TableBuilderHelper::URL` to give it access to the method. Refs #3479
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/table_builder_helper_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/helpers/table_builder_helper_spec.rb b/spec/helpers/table_builder_helper_spec.rb
index 7d7a81908..c5cbd972d 100644
--- a/spec/helpers/table_builder_helper_spec.rb
+++ b/spec/helpers/table_builder_helper_spec.rb
@@ -187,7 +187,8 @@ describe TableBuilderHelper, type: :helper do
context: { referential: referential }
)
allow(helper).to receive(:current_user).and_return(user_context)
- allow(helper).to receive(:current_referential).and_return(referential)
+ allow(TableBuilderHelper::URL).to receive(:current_referential)
+ .and_return(referential)
companies = [company]