spec/content_metadata_spec.rb in assembly-objectfile-1.8.0 vs spec/content_metadata_spec.rb in assembly-objectfile-1.8.1

- old
+ new

@@ -595,6 +595,15 @@ expect(xml.errors.size).to be 0 expect(xml.xpath('//contentMetadata')[0].attributes['type'].value).to eq('file') expect(xml.xpath('//resource').length).to be 0 expect(xml.xpath('//resource/file').length).to be 0 end + + it 'generates an error message when an unknown style is passed in' do + objects = [] + expect { + described_class.create_content_metadata(druid: TEST_DRUID, bundle: :prebundled, style: :borked, objects: objects) + }.to raise_error { |error| + expect(error.message).to eq('Supplied style (borked) not valid') + } + end end