Sha256: 5de47f173ca2f5e1c4c69017eebc981b6409a2c5790674c3a99d1a1d318d13e8

Contents?: true

Size: 508 Bytes

Versions: 74

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true
require 'rake'

RSpec.describe "blacklight:delete_old_searches" do
  before do
    @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)
    @rake[@task_name].invoke(days_old)
  end
end

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
blacklight-7.40.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.39.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.38.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.37.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.36.2 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.36.1 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.36.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.35.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.34.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.33.1 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.33.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.32.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.31.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.30.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.29.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.28.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.27.1 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.27.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-7.26.1 spec/lib/tasks/blacklight_task_spec.rb