Sha256: d82858d03a40e19c0e11e7c576c9153a84b39c0c061161b6abecacdb1adb8f44

Contents?: true

Size: 567 Bytes

Versions: 9

Compression:

Stored size: 567 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)
    @rake[@task_name].invoke(days_old)
    expect(Search).to have_received(:delete_old_searches).with(days_old)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
blacklight-8.8.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.7.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.6.1 spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.6.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.5.1 spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.5.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.4.0 spec/lib/tasks/blacklight_task_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/lib/tasks/blacklight_task_spec.rb
blacklight-8.3.0 spec/lib/tasks/blacklight_task_spec.rb