Commit 127cd3fbf50ede102d528e55c4ba50e8cc841a95
1 parent
1aeb0d56
Exists in
master
and in
28 other branches
Allowing search form to use goggle_cse plugin
(ActionItem2560)
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/views/layouts/application-ng.rhtml
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | <% end %> | 69 | <% end %> |
70 | 70 | ||
71 | </span> | 71 | </span> |
72 | - <form action="/search" class="search_form" method="get" class="clean"> | 72 | + <form action="/search" class="search_form clean" method="get" id="top-search"> |
73 | <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> | 73 | <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> |
74 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> | 74 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> |
75 | <%= javascript_tag 'jQuery("#user form input").hint();' %> | 75 | <%= javascript_tag 'jQuery("#user form input").hint();' %> |
test/functional/application_controller_test.rb
@@ -217,6 +217,12 @@ class ApplicationControllerTest < ActionController::TestCase | @@ -217,6 +217,12 @@ class ApplicationControllerTest < ActionController::TestCase | ||
217 | assert_no_tag :tag => 'div', :attributes => { :id => 'user_box' }, :descendant => { :tag => 'a', :attributes => { :href => 'http://web.mail/' } } | 217 | assert_no_tag :tag => 'div', :attributes => { :id => 'user_box' }, :descendant => { :tag => 'a', :attributes => { :href => 'http://web.mail/' } } |
218 | end | 218 | end |
219 | 219 | ||
220 | + should 'display search form with id' do | ||
221 | + @controller.stubs(:get_layout).returns('application-ng') | ||
222 | + get :index | ||
223 | + assert_tag :tag => 'form', :attributes => { :class => 'search_form clean', :id => 'top-search' } | ||
224 | + end | ||
225 | + | ||
220 | should 'display theme test panel when testing theme' do | 226 | should 'display theme test panel when testing theme' do |
221 | @request.session[:theme] = 'my-test-theme' | 227 | @request.session[:theme] = 'my-test-theme' |
222 | theme = mock | 228 | theme = mock |