debian-mirror-gitlab/spec/lib/constraints/feature_constrainer_spec.rb

14 lines
409 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-02-15 15:39:39 +05:30
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