spec/filepreviews/utils_spec.rb in filepreviews-2.0.3 vs spec/filepreviews/utils_spec.rb in filepreviews-2.0.4
- old
+ new
@@ -23,9 +23,19 @@
size = { width: 320, height: 240 }
expect(Kawaii.new.extract_size(size)).to eq('320x240')
end
end
+ describe '.extract_metadata' do
+ it 'returns one metadata entry as an array' do
+ expect(Kawaii.new.extract_metadata([:psd])).to eq([:psd])
+ end
+
+ it 'returns multipe metadata entries as an array' do
+ expect(Kawaii.new.extract_metadata([:psd, :ocr])).to eq([:psd, :ocr])
+ end
+ end
+
describe '.validate_pages' do
context 'when called with range parameters (1-3)' do
it 'validates page parameters' do
expect(Kawaii.new.validate_pages('1-3'))
.to eq('1-3')