Commit 127cd3fbf50ede102d528e55c4ba50e8cc841a95

Authored by Daniela Feitosa
1 parent 1aeb0d56

Allowing search form to use goggle_cse plugin

(ActionItem2560)
app/views/layouts/application-ng.rhtml
... ... @@ -69,7 +69,7 @@
69 69 <% end %>
70 70  
71 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 73 <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />
74 74 <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div>
75 75 <%= javascript_tag 'jQuery("#user form input").hint();' %>
... ...
test/functional/application_controller_test.rb
... ... @@ -217,6 +217,12 @@ class ApplicationControllerTest &lt; ActionController::TestCase
217 217 assert_no_tag :tag => 'div', :attributes => { :id => 'user_box' }, :descendant => { :tag => 'a', :attributes => { :href => 'http://web.mail/' } }
218 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 226 should 'display theme test panel when testing theme' do
221 227 @request.session[:theme] = 'my-test-theme'
222 228 theme = mock
... ...