Sha256: eb0234c4ef6088eb88cf1edfaa2bacf7ae060dc15c50061ee4fe2f3b05840f3d

Contents?: true

Size: 727 Bytes

Versions: 5

Compression:

Stored size: 727 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

module EacRailsUtils
  class CommonFormHelperTest < ActionView::TestCase
    include ::EacRailsUtils::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

5 entries across 5 versions & 1 rubygems

Version Path
eac_rails_utils-0.11.4 test/helpers/eac_rails_utils/common_form_helper_test.rb
eac_rails_utils-0.11.3 test/helpers/eac_rails_utils/common_form_helper_test.rb
eac_rails_utils-0.11.2 test/helpers/eac_rails_utils/common_form_helper_test.rb
eac_rails_utils-0.11.1 test/helpers/eac_rails_utils/common_form_helper_test.rb
eac_rails_utils-0.11.0 test/helpers/eac_rails_utils/common_form_helper_test.rb