-
Notifications
You must be signed in to change notification settings - Fork 12
Use Hyrax description property and add abstract property #1139
Conversation
@@ -280,7 +280,7 @@ def build_file_set(id) | |||
expect(result['@id']).to eq "http://plum.com/concern/scanned_resources/1/manifest" | |||
end | |||
it "has a description" do | |||
expect(result.description).to eq [record.description] | |||
expect(result.description).to eq [record.description.first] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be expect(result.description).to eq record.description
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They aren't equivalent. result.description
is and Array. record.description
is an RDF something something class. The test fails unless you cast that into an Array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use Array()
instead.
@@ -67,7 +67,7 @@ def metadata_hash | |||
hsh[entry["label"].to_sym] = Array(entry["value"]).join(", ") | |||
end | |||
result[:Title] = Array(scanned_resource.title).join(", ") if scanned_resource.title | |||
result[:Description] = Array(scanned_resource.description).join(", ") if scanned_resource.description | |||
result[:Description] = scanned_resource.description.join(", ") if scanned_resource.description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this change is necessary. Array([1,2,3])
leaves the array unchanged, while ensuring the description field returns an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I'll revert the change.
8b2e850
to
4eed3ba
Compare
I'm 👍, but I'll leave it to @tampakis. |
description
property is now used instead of locally defined property.abstract
property.Closes #1132