Sha256: a84edfb0e2997e3d256cae19e74bc8d451e133352a5bae560e5109e0c31625ec

Contents?: true

Size: 564 Bytes

Versions: 8

Compression:

Stored size: 564 Bytes

Contents

describe Symphonia::Attachment do

  context 'files' do
    let(:file) { FactoryBot.create(:file) }
    it '#create' do
      expect { file }.to change(described_class, :count).by 1
    end

    it 'just create common file' do
      f = nil
      expect { f = FactoryBot.create(:file, attachable: nil) }.to change(described_class, :count).by 1
      expect(f.attachable).to be_nil
    end
  end

  context 'images' do
    let(:image) { FactoryBot.create(:image) }
    it '#create' do
      expect { image }.to change(described_class, :count).by 1
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
symphonia-3.1.0 spec/models/attachment_spec.rb
symphonia-3.0.3 spec/models/attachment_spec.rb
symphonia-3.0.2 spec/models/attachment_spec.rb
symphonia-2.2.1 spec/models/attachment_spec.rb
symphonia-3.0.1 spec/models/attachment_spec.rb
symphonia-3.0.0 spec/models/attachment_spec.rb
symphonia-2.1.8 spec/models/attachment_spec.rb
symphonia-2.1.7 spec/models/attachment_spec.rb