Sha256: 6d206d7522640e603775646795827bfd92423b14402c7a10638a92d905688a92

Contents?: true

Size: 442 Bytes

Versions: 10

Compression:

Stored size: 442 Bytes

Contents

require 'spec_helper'

describe "Attachment Definitions" do
  it 'returns all of the attachments on the class' do
    reset_class "Dummy"
    Dummy.has_attached_file :avatar, {path: "abc"}
    Dummy.has_attached_file :other_attachment, {url: "123"}
    Dummy.do_not_validate_attachment_file_type :avatar
    expected = {avatar: {path: "abc"}, other_attachment: {url: "123"}}

    assert_equal expected, Dummy.attachment_definitions
  end
end

Version data entries

10 entries across 8 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/paperclip-4.2.4/spec/paperclip/attachment_definitions_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/paperclip-4.2.4/spec/paperclip/attachment_definitions_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.2/spec/paperclip/attachment_definitions_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.3/spec/paperclip/attachment_definitions_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.4/spec/paperclip/attachment_definitions_spec.rb
paperclip-4.2.4 spec/paperclip/attachment_definitions_spec.rb
paperclip-4.2.3 spec/paperclip/attachment_definitions_spec.rb
paperclip-4.2.2 spec/paperclip/attachment_definitions_spec.rb
paperclip-4.2.1 spec/paperclip/attachment_definitions_spec.rb
paperclip-4.2.0 spec/paperclip/attachment_definitions_spec.rb