Commit e9d19fcfb276a892208ccab53f317da5d4fedee3

Authored by Braulio Bhavamitra
1 parent 5bed328d

statistics: fix optional dependency on products plugin

plugins/statistics/test/unit/statistics_block_test.rb
1 1 require_relative '../test_helper'
  2 +
2 3 class StatisticsBlockTest < ActiveSupport::TestCase
3 4  
4 5 ['user_counter', 'tag_counter', 'comment_counter'].map do |counter|
... ... @@ -140,6 +141,8 @@ class StatisticsBlockTest &lt; ActiveSupport::TestCase
140 141 end
141 142  
142 143 should 'return the amount of visible environment products' do
  144 + return unless defined? ProductsPlugin
  145 +
143 146 b = StatisticsBlock.new
144 147 e = fast_create(Environment)
145 148  
... ... @@ -160,6 +163,8 @@ class StatisticsBlockTest &lt; ActiveSupport::TestCase
160 163 end
161 164  
162 165 should 'return the amount of visible enterprise products' do
  166 + return unless defined? ProductsPlugin
  167 +
163 168 b = StatisticsBlock.new
164 169  
165 170 e = fast_create(Enterprise)
... ...