From af1bb0cdaa415b4d613912d73919889be7369db3 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Tue, 1 Apr 2008 20:46:28 +0000 Subject: [PATCH] ActionItem243: adding missing integration test --- test/integration/search_popup_test.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+), 0 deletions(-) create mode 100644 test/integration/search_popup_test.rb diff --git a/test/integration/search_popup_test.rb b/test/integration/search_popup_test.rb new file mode 100644 index 0000000..abc6163 --- /dev/null +++ b/test/integration/search_popup_test.rb @@ -0,0 +1,18 @@ +require "#{File.dirname(__FILE__)}/../test_helper" + +class SearchPopupTest < ActionController::IntegrationTest + + should 'link to search without category when not inside a filter' do + get '/' + assert_tag :tag => 'a', :attributes => { :href => '/search/popup' } + end + + should 'link to search with category when inside a filter' do + parent = Category.create!(:name => 'cat1', :environment => Environment.default) + Category.create!(:name => 'subcat', :environment => Environment.default, :parent => parent) + + get '/cat/cat1/subcat' + assert_tag :tag => 'a', :attributes => { :href => '/search/popup/cat1/subcat' } + end + +end -- libgit2 0.21.2