Sha256: 69d96c1f55885214509c5980b8674cb1a1b910229c0999b81dfab70e4fece4ef

Contents?: true

Size: 516 Bytes

Versions: 4

Compression:

Stored size: 516 Bytes

Contents

require 'ar_helper'

context 'update entity field value' do
  before do
    class Entity < ActiveRecord::Base
      sample_filter kind: {type: :list,values: [:confirm, 'unconfirm']}
    end

    Entity.create(title: 'text')
  end

  it 'shoud create user and define params set' do
    expect(Entity.filter_params_set.values_for(:kind)).to eq(['confirm', 'unconfirm'])
    Entity.filter_update_value('kind', [:black, :white])
    expect(Entity.filter_params_set.values_for(:kind)).to eq(['black', 'white'])
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sample_filter-0.1.7 spec/models/entities/filter_update_value_spec.rb
sample_filter-0.1.6 spec/models/entities/filter_update_value_spec.rb
sample_filter-0.1.5 spec/models/entities/filter_update_value_spec.rb
sample_filter-0.1.4 spec/models/entities/filter_update_value_spec.rb