Sha256: 57274a3e59885fc7bb0d754cdad2a546f3d644ad7e77fab4c59102394cbc1d3b
Contents?: true
Size: 953 Bytes
Versions: 15
Compression:
Stored size: 953 Bytes
Contents
require 'spec_helper' describe GeoConcerns::Actors::FileActor do include ActionDispatch::TestProcess let(:user) { double } let(:file) { double } let(:file_set) { double } let(:actor) { described_class.new(file_set, 'test', user) } describe '#mime_type' do context 'there is a mime_type attribute on the file set' do it 'returns the file set mime type' do allow(file_set).to receive(:geo_mime_type).and_return('text/plain; gdal-format=USGSDEM') expect(actor.mime_type(file)).to eq('text/plain; gdal-format=USGSDEM') end end context 'there is not a mime_type attribute on the file set' do it 'returns the file set mime type' do allow(file_set).to receive(:geo_mime_type).and_return(nil) allow(file).to receive(:content_type).and_return('text/plain; gdal-format=USGSDEM') expect(actor.mime_type(file)).to eq('text/plain; gdal-format=USGSDEM') end end end end
Version data entries
15 entries across 15 versions & 1 rubygems