Sha256: 6c08dc00191d0ba353d099d1349a7a1aedf6663780df280f75663da6e9804728

Contents?: true

Size: 905 Bytes

Versions: 4

Compression:

Stored size: 905 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"
require "spec_helper"
require "rake"

describe "geoblacklight_sidecar_images_tasks.rake" do
  include ActiveJob::TestHelper

  # @TODO
  # gblsci:sample_data:seed
  # gblsci:images:harvest_all
  # gblsci:images:harvest_states
  # gblsci:images:harvest_retry
  # gblsci:images:harvest_report
  # gblsci:images:harvest_purge_all
  # gblsci:images:harvest_purge_orphans
  # gblsci:images:harvest_destroy_batch
  # gblsci:images:harvest_failed_state_inspect

  # DOC_ID='stanford-cz128vq0535' bundle exec rake gblsci:images:harvest_doc_id
  describe "gblsci:images:harvest_doc_id" do
    before do
      Rails.application.load_tasks
    end

    it "enqueues background job to harvest image" do
      ENV["DOC_ID"] = "princeton-02870w62c"
      Rake::Task["gblsci:images:harvest_doc_id"].invoke
      expect(enqueued_jobs.size).to eq(1)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.9.2 spec/lib/tasks/geoblacklight_sidecar_images_spec.rb
geoblacklight_sidecar_images-1.0.0 spec/lib/tasks/geoblacklight_sidecar_images_spec.rb
geoblacklight_sidecar_images-0.9.1 spec/lib/tasks/geoblacklight_sidecar_images_spec.rb
geoblacklight_sidecar_images-0.9.0 spec/lib/tasks/geoblacklight_sidecar_images_spec.rb