Added crop search form to header

This commit is contained in:
Skud
2014-01-03 21:26:35 +11:00
parent 8588d0f901
commit 9b278ed05e
2 changed files with 8 additions and 1 deletions

View File

@@ -49,10 +49,12 @@
%li= link_to "Crop Wrangling", wrangle_crops_path
- if current_member.has_role?(:admin)
%li= link_to "Admin", admin_path
%li= link_to "Sign out", destroy_member_session_path, :method => :delete
- else
%li= link_to 'Sign in', new_member_session_path
%li= link_to 'Sign up', new_member_registration_path
= form_tag 'crops_search_path', :method => :get, :class => 'navbar-search pull-right' do
= text_field_tag 'search', nil, :placeholder => 'Search crops'

View File

@@ -44,6 +44,11 @@ describe 'layouts/_header.html.haml', :type => "view" do
assert_select("a[href=#{forums_path}]", 'Forums')
end
it 'has a crop search' do
assert_select("form[action=crops_search_path]")
assert_select("input#search")
end
end
context "logged in" do