Commit e9d19fcfb276a892208ccab53f317da5d4fedee3
1 parent
5bed328d
Exists in
staging
and in
29 other branches
statistics: fix optional dependency on products plugin
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
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 < 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 < 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) | ... | ... |