aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
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