summaryrefslogtreecommitdiff
path: root/spec/lib/constraints/feature_constrainer_spec.rb
blob: 0739da801a7bea7c4fd60ae06fad082b7141abf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

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