Sha256: 71f5cc7430f81f3da5595ca8aef94260f833e4be6bcf58ded8a2dcc024dfe6b1
Contents?: true
Size: 813 Bytes
Versions: 1
Compression:
Stored size: 813 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper' class SearchTest < Presenting::Test def setup @s = Presentation::Search.new end # there's no configuration yet end class SearchRenderTest < Presentation::RenderTest def setup @presentation = Presentation::Search.new @presentation.controller = ActionView::TestCase::TestController.new @presentation.controller.request.path = '/users' end def test_rendering_a_form_reuses_current_path assert_select 'form[action=/users?][method=get]' end def test_rendering_a_search_box assert_select 'form input[type=text][name=search]' end def test_rendering_a_search_box_with_a_existing_search @presentation.controller.params[:search] = 'foo' assert_select 'form input[type=text][name=search][value=foo]' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
presenting-2.0.0 | test/search_test.rb |