Sha256: 555470bc321b41abdf6bf215197de8c9fc2623c9066751a02b9bafdf0094f506

Contents?: true

Size: 727 Bytes

Versions: 8

Compression:

Stored size: 727 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

8 entries across 8 versions & 1 rubygems

Version Path
rails3-jquery-autocomplete-0.6.2 test/form_helper_test.rb
rails3-jquery-autocomplete-0.6.1 test/form_helper_test.rb
rails3-jquery-autocomplete-0.6.0 test/form_helper_test.rb
rails3-jquery-autocomplete-0.5.1 test/form_helper_test.rb
rails3-jquery-autocomplete-0.5.0 test/form_helper_test.rb
rails3-jquery-autocomplete-0.4.0 test/form_helper_test.rb
rails3-jquery-autocomplete-0.3.6 test/form_helper_test.rb
rails3-jquery-autocomplete-0.3.5 test/form_helper_test.rb