Sha256: 8495e77a9f0c2ef7ccf217e1edb11196e80cf52ca9aa36af3deb7f105180957a

Contents?: true

Size: 496 Bytes

Versions: 21

Compression:

Stored size: 496 Bytes

Contents

require 'test_helper'

class LinkTest < ActionView::TestCase
  
  def test_link_target
    link = BentoSearch::Link.new(:label => "foo", :url => "/foo", :target => "custom_target")
    
    render "bento_search/link", :link => link
    
    assert_select("a[target=custom_target]")
  end
  
  def test_link_no_target
    link = BentoSearch::Link.new(:label => "foo", :url => "/foo")
    
    render "bento_search/link", :link => link
    
    assert_select("a[target]", :count => 0)
  end
  
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bento_search-2.0.0.rc1 test/view/link_test.rb
bento_search-1.7.0 test/view/link_test.rb
bento_search-1.6.1 test/view/link_test.rb
bento_search-1.7.0.beta.1 test/view/link_test.rb
bento_search-1.6.0 test/view/link_test.rb
bento_search-1.5.0 test/view/link_test.rb
bento_search-1.4.4 test/view/link_test.rb
bento_search-1.4.3 test/view/link_test.rb
bento_search-1.4.2 test/view/link_test.rb
bento_search-1.3.0 test/view/link_test.rb
bento_search-1.2.2 test/view/link_test.rb
bento_search-1.2.1 test/view/link_test.rb
bento_search-1.2.0 test/view/link_test.rb
bento_search-1.1.0 test/view/link_test.rb
bento_search-1.0.6 test/view/link_test.rb
bento_search-1.0.4 test/view/link_test.rb
bento_search-1.0.3 test/view/link_test.rb
bento_search-1.0.2 test/view/link_test.rb
bento_search-1.0.1 test/view/link_test.rb
bento_search-1.0.0 test/view/link_test.rb