mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
Added crop search form to header
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user