Sha256: e1fbb4deb3297249cd9212c399b1ce7c92591530b9a2840501b7c75fe0a1a0e7

Contents?: true

Size: 705 Bytes

Versions: 4

Compression:

Stored size: 705 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

module Eac
  class CommonFormHelperTest < ActionView::TestCase
    include Eac::CommonFormHelper

    setup do
      reset_test_database
    end

    test 'test common form' do
      common_form(User.new) do |f|
        f.text_field :name
        f.email_field :email
        f.password_field :password
        f.searchable_association_field :job, url: search_jobs_path
      end
    end

    test 'fields for' do
      common_form(Job.new) do |f|
        f.text_field :name
        f.fields_for :users do |nf|
          nf.text_field :name
          nf.email_field :email
          nf.password_field :password
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eac_rails_utils-0.10.1 test/lib/eac/common_form_helper_test.rb
eac_rails_utils-0.10.0 test/lib/eac/common_form_helper_test.rb
eac_rails_utils-0.9.1 test/lib/eac/common_form_helper_test.rb
eac_rails_utils-0.9.0 test/lib/eac/common_form_helper_test.rb