Sha256: 113b3bc00e8950a95c53614602ddecbdccedef73fba0ea7ecf1298e26cc2a521

Contents?: true

Size: 464 Bytes

Versions: 3

Compression:

Stored size: 464 Bytes

Contents

require 'rails_helper'

RSpec.describe Attachy::Viewer, '.remove_button_options' do
  let!(:object) { create :user }
  let!(:method) { :avatar }

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

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

  subject { described_class.new method, object }

  it 'returns the default remove button options' do
    expect(subject.remove_button_options).to eq(class: :attachy__remove)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
attachy-0.1.2 spec/models/attachy/viewer/remove_button_options_spec.rb
attachy-0.1.1 spec/models/attachy/viewer/remove_button_options_spec.rb
attachy-0.1.0 spec/models/attachy/viewer/remove_button_options_spec.rb