spec/lib/tasks/blacklight_task_spec.rb in blacklight-7.0.0.rc1 vs spec/lib/tasks/blacklight_task_spec.rb in blacklight-7.0.0.rc2
- old
+ new
@@ -1,20 +1,18 @@
# frozen_string_literal: true
require 'rake'
RSpec.describe "blacklight:delete_old_searches" do
-
before do
- @rake = Rake::Application.new
+ @rake = Rake::Application.new
Rake.application = @rake
Rake.application.rake_require "../lib/railties/blacklight"
Rake::Task.define_task(:environment)
@task_name = "blacklight:delete_old_searches"
end
-
+
it "calls Search.delete_old_searches" do
days_old = 7
- allow(Search).to receive(:delete_old_searches).with(days_old)
+ allow(Search).to receive(:delete_old_searches).with(days_old)
@rake[@task_name].invoke(days_old)
end
-
end