Sha256: 8e99c382712d11069665ab303be6cfae322c884f749eaf28f63de2710a7d6743
Contents?: true
Size: 657 Bytes
Versions: 1
Compression:
Stored size: 657 Bytes
Contents
require "spec_helper" class ExtractThing < ActiveFedora::Datastream include Hydra::Derivatives::ExtractMetadata attr_accessor :pid end describe Hydra::Derivatives::ExtractMetadata, :unless => $in_travis do let(:subject) { ExtractThing.new } let(:attachment) { File.open(File.expand_path('../../fixtures/world.png', __FILE__))} describe "Image Content" do it "should get a mime type" do subject.content = attachment subject.pid = "abc" xml = subject.extract_metadata doc = Nokogiri::HTML(xml) identity = doc.xpath('//identity').first expect(identity.attr('mimetype')).to eq('image/png') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hydra-derivatives-0.1.1 | spec/units/extract_spec.rb |