Sha256: 9efb7670924b326af91f285ac7cfc23bd88c83e0c4c0093237f979a1a9344353
Contents?: true
Size: 605 Bytes
Versions: 6
Compression:
Stored size: 605 Bytes
Contents
require 'spec_helper' describe Spree::Image, type: :model do context '#save' do context 'invalid attachment' do let(:invalid_image) { File.open(__FILE__) } subject { described_class.new(attachment: invalid_image) } it 'returns false' do expect(subject.save).to be false end end context 'valid attachment' do let(:valid_image) { File.open(File.join('spec', 'fixtures', 'thinking-cat.jpg')) } subject { described_class.new(attachment: valid_image) } it 'returns true' do expect(subject.save).to be true end end end end
Version data entries
6 entries across 6 versions & 1 rubygems