Sha256: 6f4a6a28f273327a99b07a4a64122fec00592c9fad2b2f5edbb2c6b620ca8043

Contents?: true

Size: 614 Bytes

Versions: 5

Compression:

Stored size: 614 Bytes

Contents

require 'spec_helper'

describe 'Admin Presets Person' do

  before(:all) { set_resource 'admin-preset' }
  before { as :admin }

  let!(:preset) { create(:preset) }

  before do
    visit gaku.admin_root_path
    click '#presets-menu a'
    click js_edit_link
    click '#admin-preset-person-tab-link'
  end

  it 'saves', js: true do
    select 'Female', from: 'preset_person_gender'
    click submit

    flash_updated?
    click '#admin-preset-person-tab-link'
    expect(find_field('preset_person_gender').value).to eq 'false'

    preset.reload
    expect(preset['person']['gender']).to eq 'false'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gaku-0.2.4 admin/spec/features/presets/person_preset_spec.rb
gaku-0.2.3 admin/spec/features/presets/person_preset_spec.rb
gaku-0.2.2 admin/spec/features/presets/person_preset_spec.rb
gaku-0.2.1 admin/spec/features/presets/person_preset_spec.rb
gaku-0.2.0 admin/spec/features/presets/person_preset_spec.rb