KITAITI Makoto
null+****@clear*****
Tue Dec 23 09:02:42 JST 2014
KITAITI Makoto 2014-12-23 09:02:42 +0900 (Tue, 23 Dec 2014) New Revision: edb7fe64a2b47017ba27b1f5446e59589482d908 https://github.com/ranguba/epub-searcher/commit/edb7fe64a2b47017ba27b1f5446e59589482d908 Message: Add tests for search form Modified files: test/app/controllers/main_controller_test.rb Modified: test/app/controllers/main_controller_test.rb (+13 -0) =================================================================== --- test/app/controllers/main_controller_test.rb 2014-12-23 09:02:05 +0900 (81c4411) +++ test/app/controllers/main_controller_test.rb 2014-12-23 09:02:42 +0900 (673b522) @@ -5,10 +5,23 @@ class MainControllerTest < Test::Unit::TestCase assert last_response.ok? end + def test_get_index_form + visit '/' + + assert page.has_selector?('form input[type="search"]') + end + def test_get_index_query omit 'Background Droonga processes not running on Travis CI' if ENV['TRAVIS'] get '/?q=test' assert last_response.ok? end + + def test_get_index_query_form + omit 'Background Droonga processes not running on Travis CI' if ENV['TRAVIS'] + visit "/?q=%3C" + + assert_equal '<', find('form input[type="search"]').value + end end -------------- next part -------------- HTML����������������������������... 下載