aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAlban Peignier2018-04-25 23:42:44 +0200
committerAlban Peignier2018-04-26 00:45:13 +0200
commitb0f53ae97c36cbe2e94fc4fd6104b70a9589b92c (patch)
tree300a60942d93f8cbd6450c6b0df5303fa09a87a9 /spec
parent0c40a4a977405972158a0a653b67ccf268f8645b (diff)
downloadchouette-core-b0f53ae97c36cbe2e94fc4fd6104b70a9589b92c.tar.bz2
Fixes problems in CleanUp specs. Refs #5372
Diffstat (limited to 'spec')
-rw-r--r--spec/models/clean_up_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/models/clean_up_spec.rb b/spec/models/clean_up_spec.rb
index 2753c8718..afd2d8721 100644
--- a/spec/models/clean_up_spec.rb
+++ b/spec/models/clean_up_spec.rb
@@ -98,7 +98,13 @@ RSpec.describe CleanUp, :type => :model do
end
context '#clean' do
- let(:cleaner) { create(:clean_up, date_type: :before) }
+ let(:referential) { Referential.new }
+ let(:cleaner) { create(:clean_up, date_type: :before, referential: referential) }
+
+ before do
+ allow(referential).to receive(:switch)
+ end
+
it 'should call destroy_time_tables_before' do
cleaner.date_type = :before