Sha256: 11f7492b25b78b0849a31bfaf9c25934e7aecd43c80af8ac71a21fb209194beb

Contents?: true

Size: 463 Bytes

Versions: 4

Compression:

Stored size: 463 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Attachy::Viewer, '.field_options' do
  subject { described_class.new method, object }

  let!(:object) { create :user }
  let!(:method) { :avatar }

  let!(:file) do
    allow(Cloudinary::Uploader).to receive(:remove_tag)

    create :file, attachable: object, scope: method
  end

  it 'returns the default field options' do
    expect(subject.field_options).to eq(class: :attachy)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
attachy-0.4.1 spec/models/attachy/viewer/field_options_spec.rb
attachy-0.4.0 spec/models/attachy/viewer/field_options_spec.rb
attachy-0.3.0 spec/models/attachy/viewer/field_options_spec.rb
attachy-0.2.0 spec/models/attachy/viewer/field_options_spec.rb