test/unit/cleaner_test.rb in foreman-tasks-0.17.3 vs test/unit/cleaner_test.rb in foreman-tasks-0.17.4

- old
+ new

@@ -77,13 +77,13 @@ it 'supports passing empty filter (just delete all)' do cleaner = ForemanTasks::Cleaner.new(:filter => '', :after => '10d') tasks_to_delete = [FactoryBot.create(:dynflow_task, :user_create_task), FactoryBot.create(:dynflow_task, :product_create_task)] - tasks_to_keep = [FactoryBot.create(:dynflow_task, :user_create_task) do |task| - task.started_at = task.ended_at = Time.zone.now - task.save - end] + tasks_to_keep = [FactoryBot.create(:dynflow_task, :user_create_task) do |task| + task.started_at = task.ended_at = Time.zone.now + task.save + end] cleaner.expects(:tasks_to_csv) cleaner.delete ForemanTasks::Task.where(id: tasks_to_delete).must_be_empty ForemanTasks::Task.where(id: tasks_to_keep).must_equal tasks_to_keep end