Skip to content

Commit

Permalink
Major version bump v3.0.0.beta1 (#445)
Browse files Browse the repository at this point in the history
* first beta release for v3.0.0

* fix specs
  • Loading branch information
bkiahstroud authored Mar 24, 2022
1 parent 0fcdd87 commit 8217971
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GIT
PATH
remote: .
specs:
bulkrax (2.3.0)
bulkrax (3.0.0.beta1)
bagit (~> 0.4)
coderay
iso8601 (~> 0.9.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/bulkrax/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Bulkrax
VERSION = '2.3.0'
VERSION = '3.0.0.beta1'
end
36 changes: 34 additions & 2 deletions spec/models/bulkrax/csv_entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@
module Bulkrax
RSpec.describe CsvEntry, type: :model do
let(:collection) { FactoryBot.build(:collection) }
let(:hyrax_record) do
OpenStruct.new(
file_sets: [],
member_of_collections: [],
member_of_work_ids: [],
in_work_ids: [],
member_work_ids: []
)
end

before do
allow_any_instance_of(described_class).to receive(:collections_created?).and_return(true)
allow_any_instance_of(described_class).to receive(:find_collection).and_return(collection)
allow(subject).to receive(:hyrax_record).and_return(hyrax_record)
end

describe 'builds entry' do
Expand Down Expand Up @@ -398,6 +408,9 @@ module Bulkrax
allow_any_instance_of(ObjectFactory).to receive(:run!)
allow(subject).to receive(:hyrax_record).and_return(work_obj)
allow(work_obj).to receive(:id).and_return('test123')
allow(work_obj).to receive(:member_of_work_ids).and_return([])
allow(work_obj).to receive(:in_work_ids).and_return([])
allow(work_obj).to receive(:member_work_ids).and_return([])
end

it 'succeeds' do
Expand Down Expand Up @@ -436,6 +449,9 @@ module Bulkrax
allow_any_instance_of(ObjectFactory).to receive(:run!)
allow(subject).to receive(:hyrax_record).and_return(work_obj)
allow(work_obj).to receive(:id).and_return('test123')
allow(work_obj).to receive(:member_of_work_ids).and_return([])
allow(work_obj).to receive(:in_work_ids).and_return([])
allow(work_obj).to receive(:member_work_ids).and_return([])
end

it 'succeeds' do
Expand Down Expand Up @@ -483,6 +499,9 @@ module Bulkrax
allow_any_instance_of(ObjectFactory).to receive(:run!)
allow(subject).to receive(:hyrax_record).and_return(work_obj)
allow(work_obj).to receive(:id).and_return('test123')
allow(work_obj).to receive(:member_of_work_ids).and_return([])
allow(work_obj).to receive(:in_work_ids).and_return([])
allow(work_obj).to receive(:member_work_ids).and_return([])
end

it 'succeeds' do
Expand Down Expand Up @@ -533,6 +552,9 @@ module Bulkrax
allow_any_instance_of(ObjectFactory).to receive(:run!)
allow(subject).to receive(:hyrax_record).and_return(work_obj)
allow(work_obj).to receive(:id).and_return('test123')
allow(work_obj).to receive(:member_of_work_ids).and_return([])
allow(work_obj).to receive(:in_work_ids).and_return([])
allow(work_obj).to receive(:member_work_ids).and_return([])
end

it 'succeeds' do
Expand Down Expand Up @@ -580,6 +602,9 @@ module Bulkrax
allow_any_instance_of(ObjectFactory).to receive(:run!)
allow(subject).to receive(:hyrax_record).and_return(work_obj)
allow(work_obj).to receive(:id).and_return('test123')
allow(work_obj).to receive(:member_of_work_ids).and_return([])
allow(work_obj).to receive(:in_work_ids).and_return([])
allow(work_obj).to receive(:member_work_ids).and_return([])
end

it 'succeeds' do
Expand Down Expand Up @@ -627,6 +652,9 @@ module Bulkrax
allow_any_instance_of(ObjectFactory).to receive(:run!)
allow(subject).to receive(:hyrax_record).and_return(work_obj)
allow(work_obj).to receive(:id).and_return('test123')
allow(work_obj).to receive(:member_of_work_ids).and_return([])
allow(work_obj).to receive(:in_work_ids).and_return([])
allow(work_obj).to receive(:member_work_ids).and_return([])
end

it 'succeeds' do
Expand All @@ -644,7 +672,7 @@ module Bulkrax

describe '#build_relationship_metadata' do
subject(:entry) { described_class.new(importerexporter: exporter) }
let(:exporter) { create(:bulkrax_exporter) }
let(:exporter) { create(:bulkrax_exporter, :with_relationships_mappings) }
let(:hyrax_record) do
OpenStruct.new(
has_model: ['Work'],
Expand All @@ -656,6 +684,8 @@ module Bulkrax

before do
allow(entry).to receive(:hyrax_record).and_return(hyrax_record)
allow(entry).to receive(:source_identifier).and_return('source_identifier')
allow(entry).to receive(:work_identifier).and_return('source')
end

it 'gets called by #build_export_metadata' do
Expand Down Expand Up @@ -738,7 +768,7 @@ module Bulkrax

describe '#build_files' do
subject(:entry) { described_class.new(importerexporter: exporter) }
let(:exporter) { create(:bulkrax_exporter) }
let(:exporter) { create(:bulkrax_exporter, :with_relationships_mappings) }

before do
allow(entry).to receive(:hyrax_record).and_return(hyrax_record)
Expand All @@ -757,6 +787,8 @@ module Bulkrax
before do
allow(hyrax_record).to receive(:is_a?).with(FileSet).and_return(false)
allow(hyrax_record).to receive(:is_a?).with(Collection).and_return(true)
allow(entry).to receive(:source_identifier).and_return('source_identifier')
allow(entry).to receive(:work_identifier).and_return('source')
end

it 'does not get called by #build_export_metadata' do
Expand Down

0 comments on commit 8217971

Please sign in to comment.