Sha256: 2f1cea472cf4fd87b5abbc12b03cbcc9a7fdae025399941b1af7e1a4fcf76943

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

context 'check field hidden in form' do
  let(:options) do
    {
      title: {type: :string, hidden_input: false},
      amount: {type: :number},
      sort: {
        type: :sorting,
        values: [:id, :title, :amount],
        default_value: 'id_desc',
        hidden_input: true
      }
    }
  end

  subject { SampleFilter::ParamsSet.new(options) }

  it { expect(subject.hidden_input?(:title)).to eq(false) }
  it { expect(subject.hidden_input?(:amount)).to eq(false) }
  it { expect(subject.hidden_input?('sort')).to eq(true) }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sample_filter-0.1.7 spec/lib/params_set/hidden_input_spec.rb
sample_filter-0.1.6 spec/lib/params_set/hidden_input_spec.rb
sample_filter-0.1.5 spec/lib/params_set/hidden_input_spec.rb