Commit 23f5a418672dca0f5b252e0ee112e724d12a1102

Authored by Eduardo Passos
1 parent 3f5e3976

new test for statistic block

Add test to not show products when they are disabled in environment.
plugins/statistics/test/functional/statistics_plugin_home_controller_test.rb 100644 → 100755
@@ -84,6 +84,9 @@ class HomeControllerTest < ActionController::TestCase @@ -84,6 +84,9 @@ class HomeControllerTest < ActionController::TestCase
84 end 84 end
85 85
86 should 'not display products class in statistics-block-data block' do 86 should 'not display products class in statistics-block-data block' do
  87 + @block.product_counter = true
  88 + @environment.disable('products_for_enterprises')
  89 + @block.save!
87 get :index 90 get :index
88 91
89 assert_no_tag :tag => 'div', :attributes => {:class => 'statistics-block-data'}, :descendant => { :tag => 'li', :attributes => {:class => 'products'} } 92 assert_no_tag :tag => 'div', :attributes => {:class => 'statistics-block-data'}, :descendant => { :tag => 'li', :attributes => {:class => 'products'} }