Sha256: cd89fe9fb1d821884ed52eef20146fedf5b7c32158d29dbe63cffb19fc640b7b
Contents?: true
Size: 576 Bytes
Versions: 3
Compression:
Stored size: 576 Bytes
Contents
require 'rails_helper' RSpec.describe Attachy::Viewer, '.hidden_field' 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 before { allow(subject).to receive(:value) { :value } } subject { described_class.new method, object } it 'returns the hidden field with attachments value' do el = subject.hidden_field expect(el).to have_tag :input, with: { name: 'user[avatar]', type: 'hidden', value: 'value' } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
attachy-0.1.2 | spec/models/attachy/viewer/hidden_field_spec.rb |
attachy-0.1.1 | spec/models/attachy/viewer/hidden_field_spec.rb |
attachy-0.1.0 | spec/models/attachy/viewer/hidden_field_spec.rb |