Sha256: 8849030dff6f9379ac9a8865c370a8ab98aba910ac335591796d2699c43c9398

Contents?: true

Size: 454 Bytes

Versions: 10

Compression:

Stored size: 454 Bytes

Contents

RSpec.describe Flipper::Expressions::Property do
  describe "#call" do
    it "returns value for property key" do
      context = { properties: { "flipper_id" => "User;1" } }
      expect(described_class.call("flipper_id", context: context)).to eq("User;1")
    end

    it "returns nil if key not found in properties" do
      context = { properties: { } }
      expect(described_class.call("flipper_id", context: context)).to be(nil)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flipper-1.3.2 spec/flipper/expressions/property_spec.rb
flipper-1.3.1 spec/flipper/expressions/property_spec.rb
flipper-1.3.0 spec/flipper/expressions/property_spec.rb
flipper-1.3.0.pre spec/flipper/expressions/property_spec.rb
flipper-1.2.2 spec/flipper/expressions/property_spec.rb
flipper-1.2.1 spec/flipper/expressions/property_spec.rb
flipper-1.2.0 spec/flipper/expressions/property_spec.rb
flipper-1.1.2 spec/flipper/expressions/property_spec.rb
flipper-1.1.1 spec/flipper/expressions/property_spec.rb
flipper-1.1.0 spec/flipper/expressions/property_spec.rb