Sha256: 91ad8e01bc392d11aa4edf8c0337d29cccc8b723ceec005a6c3fdcca0b443b5b

Contents?: true

Size: 366 Bytes

Versions: 2

Compression:

Stored size: 366 Bytes

Contents

require 'rails_helper'
require 'paperclip/matchers'

RSpec.describe Image, type: :model do
  include Paperclip::Shoulda::Matchers

  it { should have_attached_file(:file) }
  it { should validate_attachment_content_type(:file).
        allowing('image/png', 'image/gif', 'image/jpeg')
  }
  it { should validate_attachment_size(:file).less_than(2.megabytes) }


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
introspective_grape-0.0.4 spec/models/image_spec.rb
introspective_grape-0.0.3 spec/models/image_spec.rb