Commit af1bb0cdaa415b4d613912d73919889be7369db3

Authored by AntonioTerceiro
1 parent 4ae1f84f

ActionItem243: adding missing integration test


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1625 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 18 additions and 0 deletions   Show diff stats
test/integration/search_popup_test.rb 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +require "#{File.dirname(__FILE__)}/../test_helper"
  2 +
  3 +class SearchPopupTest < ActionController::IntegrationTest
  4 +
  5 + should 'link to search without category when not inside a filter' do
  6 + get '/'
  7 + assert_tag :tag => 'a', :attributes => { :href => '/search/popup' }
  8 + end
  9 +
  10 + should 'link to search with category when inside a filter' do
  11 + parent = Category.create!(:name => 'cat1', :environment => Environment.default)
  12 + Category.create!(:name => 'subcat', :environment => Environment.default, :parent => parent)
  13 +
  14 + get '/cat/cat1/subcat'
  15 + assert_tag :tag => 'a', :attributes => { :href => '/search/popup/cat1/subcat' }
  16 + end
  17 +
  18 +end
... ...