Sha256: 91cf793bdc6d0269b86855e06094332e9dca9423fce5feea6db05c884a30aa59

Contents?: true

Size: 519 Bytes

Versions: 67

Compression:

Stored size: 519 Bytes

Contents

require 'spec_helper'

module Ddr::Jobs
  RSpec.describe UpdateIndex do

    it "should use the :index queue" do
      expect(described_class.queue).to eq(:index)
    end

    describe ".perform" do
      let!(:obj) { double(update_index: nil) }
      before do
        allow(ActiveFedora::Base).to receive(:find).with("test:1") { obj }
      end
      it "should call `update_index` on the object" do
        expect(obj).to receive(:update_index)
        described_class.perform("test:1")
      end
    end

  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
ddr-models-2.6.2 spec/jobs/update_index_spec.rb
ddr-models-2.6.1 spec/jobs/update_index_spec.rb
ddr-models-2.6.0 spec/jobs/update_index_spec.rb
ddr-models-2.6.0.rc4 spec/jobs/update_index_spec.rb
ddr-models-2.6.0.rc3 spec/jobs/update_index_spec.rb
ddr-models-2.6.0.rc2 spec/jobs/update_index_spec.rb
ddr-models-2.6.0.rc1 spec/jobs/update_index_spec.rb
ddr-models-2.5.3 spec/jobs/update_index_spec.rb
ddr-models-2.5.2 spec/jobs/update_index_spec.rb
ddr-models-2.5.1 spec/jobs/update_index_spec.rb
ddr-models-2.5.0 spec/jobs/update_index_spec.rb
ddr-models-2.5.0.rc1 spec/jobs/update_index_spec.rb
ddr-models-2.4.16 spec/jobs/update_index_spec.rb
ddr-models-2.4.15 spec/jobs/update_index_spec.rb
ddr-models-2.4.14 spec/jobs/update_index_spec.rb
ddr-models-2.4.13 spec/jobs/update_index_spec.rb
ddr-models-2.4.12 spec/jobs/update_index_spec.rb
ddr-models-2.4.11 spec/jobs/update_index_spec.rb
ddr-models-3.0.8 spec/jobs/update_index_spec.rb
ddr-models-3.0.7 spec/jobs/update_index_spec.rb