Redefine const ALL_FEATURES in JH
Related issue link: #1089 (closed)
What does this MR do
ee/spec/support/helpers/ee/license_helpers.rb
def stub_licensed_features(features)
missing_features = features.keys.map(&:to_sym) - GitlabSubscriptions::Features::ALL_FEATURES
if missing_features.any?
subject = missing_features.join(', ')
noun = 'feature'.pluralize(missing_features.size)
raise ArgumentError, "#{subject} should be defined as licensed #{noun}"
end
# ...
stub_licensed_features
is a helper method that helps mock feature license in test environment,
it depends on GitlabSubscriptions::Features::ALL_FEATURES
.
Re-define ALL_FEATURES
in JH to allow JH specific features to be found.
cc EM @prajnamas
由 Baodong 编辑于