Sha256: 27b384b56081a00236ce15da676438c8fb3ecfb233b0545a63bfe823b4db2d63

Contents?: true

Size: 726 Bytes

Versions: 6

Compression:

Stored size: 726 Bytes

Contents

require "test_helper"

class Post
  attr_accessor :author
end

class FormHelperTest < ActionView::TestCase
  def test_text_field_tag
    assert_match(/data-autocomplete=\"some\/path\"/, text_field_tag('field_name', '', :autocomplete => 'some/path'))
  end

  def test_text_field
    post = Post.new
    assert_match(/data-autocomplete=\"some\/path\"/, text_field(:post, :author, :autocomplete => 'some/path'))
  end

  def test_autocomplete_field_tag
    assert_match(/data-autocomplete=\"some\/path\"/, autocomplete_field_tag('field_name', '', 'some/path'))
  end

  def test_autocomplete_field
    post= Post.new
    assert_match(/data-autocomplete=\"some\/path\"/, autocomplete_field(:post, :author, 'some/path'))
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rails3-jquery-autocomplete-moc-0.3.3 test/form_helper_test.rb
rails3-jquery-autocomplete-0.3.4 test/form_helper_test.rb
rails3-jquery-autocomplete-moc-0.3.1 test/form_helper_test.rb
rails3-jquery-autocomplete-0.3.3 test/form_helper_test.rb
rails3-jquery-autocomplete-0.3.2 test/form_helper_test.rb
rails3-jquery-autocomplete-0.3.1 test/form_helper_test.rb