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-3.0.6 spec/jobs/update_index_spec.rb
ddr-models-3.0.5 spec/jobs/update_index_spec.rb
ddr-models-3.0.4 spec/jobs/update_index_spec.rb
ddr-models-3.0.3 spec/jobs/update_index_spec.rb
ddr-models-3.0.2 spec/jobs/update_index_spec.rb
ddr-models-3.0.1 spec/jobs/update_index_spec.rb
ddr-models-3.0.0 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.rc6 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.rc5 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.rc4 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.rc3 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.rc2 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.rc1 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.beta.22 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.beta.21 spec/jobs/update_index_spec.rb
ddr-models-2.4.10 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.beta.20 spec/jobs/update_index_spec.rb
ddr-models-2.4.9 spec/jobs/update_index_spec.rb
ddr-models-3.0.0.beta.18 spec/jobs/update_index_spec.rb
ddr-models-2.4.8 spec/jobs/update_index_spec.rb