Sha256: fa9817e634dc8d3aaefdd70a23786013c0bddceda40f1bdacf4860864b24ae98

Contents?: true

Size: 436 Bytes

Versions: 28

Compression:

Stored size: 436 Bytes

Contents

require 'spec_helper'

describe Alchemy::Admin::AttachmentsHelper do
  describe '#mime_to_human' do
    context 'when given mime type has no translation' do
      it "should return the default" do
        expect(helper.mime_to_human('something')).to eq('File')
      end
    end

    it "should return the translation for the given mime type" do
      expect(helper.mime_to_human('text/plain')).to eq('Text-Document')
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
alchemy_cms-3.3.0.rc1 spec/helpers/alchemy/admin/attachments_helper_spec.rb
alchemy_cms-3.2.1 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.3 spec/helpers/admin/attachments_helper_spec.rb
lc_alchemy_cms-3.2.1 spec/helpers/admin/attachments_helper_spec.rb
lc_alchemy_cms-3.2.0 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.2.0 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.2.0.rc1 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.2.0.beta spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.1 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.0.4 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.rc3 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.rc2 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.rc1 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.beta6 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.beta5 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.beta4 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.0.3 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.beta3 spec/helpers/admin/attachments_helper_spec.rb
alchemy_cms-3.1.0.beta2 spec/helpers/admin/attachments_helper_spec.rb