Sha256: f8bc41afcad409a43f426565588672aed875901a41978fa79a08391dee4a8d0a

Contents?: true

Size: 790 Bytes

Versions: 6

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true
require 'rails_helper'

RSpec.describe Zizia::PreIngestWork do
  let(:pre_ingest_work) { FactoryBot.create(:pre_ingest_work, deduplication_key: '42') }
  let(:pre_ingest_work_indexed) { FactoryBot.create(:pre_ingest_work, deduplication_key: '43') }
  let(:work) { Work.new(title: ['A Nice Title'], deduplication_key: '43') }

  before do
    work.save
  end

  it 'has a deduplication_key' do
    expect(pre_ingest_work.deduplication_key).to eq '42'
  end

  it 'can return that metadata has not been indexed yet' do
    expect(pre_ingest_work.title).to eq('This work\'s metadata has not been indexed yet.')
  end

  it 'can return a title for a work based on the deduplication key' do
    expect(pre_ingest_work_indexed.title).to eq('A Nice Title')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zizia-6.0.1 spec/models/zizia/pre_ingest_work_spec.rb
zizia-6.0.0 spec/models/zizia/pre_ingest_work_spec.rb
zizia-5.5.0 spec/models/zizia/pre_ingest_work_spec.rb
zizia-5.4.0 spec/models/zizia/pre_ingest_work_spec.rb
zizia-5.3.0 spec/models/zizia/pre_ingest_work_spec.rb
zizia-5.2.0 spec/models/zizia/pre_ingest_work_spec.rb