gitlab-org--gitlab-foss/spec/lib/constraints/feature_constrainer_spec.rb
Bob Van Landuyt 2e8d0153cd Pass on arguments passed to the FeatureConstrainer
All arguments passed to the `FeatureConstrainer` will be passed on to
the `Feature.enabled?` check.
2018-12-14 14:35:05 +01:00

11 lines
378 B
Ruby

require 'spec_helper'
describe Constraints::FeatureConstrainer do
describe '#matches' do
it 'calls Feature.enabled? with the correct arguments' do
expect(Feature).to receive(:enabled?).with(:feature_name, "an object", default_enabled: true)
described_class.new(:feature_name, "an object", default_enabled: true).matches?(double('request'))
end
end
end