Skip to content

Commit

Permalink
TDLR-2526 - another feature test and factory to fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoodmon committed Dec 2, 2023
1 parent 7191b0b commit 37d3795
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions spec/factories/collections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
with_solr_document { false }
end
sequence(:title) { |n| ["Collection Title #{n}"] }
sequence(:ead) { |n| ["EAD id #{n}"] }
sequence(:call_number) { |n| ["Call Number #{n}"] }
sequence(:finding_aid) { |n| ["Finding Aid #{n}"] }

after(:build) do |collection, evaluator|
collection.apply_depositor_metadata(evaluator.user.user_key)
Expand Down Expand Up @@ -186,7 +187,8 @@
end

sequence(:title) { |n| ["Typeless Collection Title #{n}"] }
sequence(:ead) { |n| ["EAD #{n}"] }
sequence(:call_number) { |n| ["Call Number #{n}"] }
sequence(:finding_aid) { |n| ["Finding Aid #{n}"] }

after(:build) do |collection, evaluator|
collection.apply_depositor_metadata(evaluator.user.user_key)
Expand Down
5 changes: 3 additions & 2 deletions spec/models/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
let(:work) { collection }
end

it "can have an associated EAD" do
expect(collection.ead.first).to start_with "EAD id"
it "has an associated call_number and finding_aid" do
expect(collection.call_number.first).to start_with "Call Number"
expect(collection.finding_aid.first).to start_with "Finding Aid"
end
end

0 comments on commit 37d3795

Please sign in to comment.