From 51f6a82e66b6d74693c3d4029e490cf7d0c31766 Mon Sep 17 00:00:00 2001 From: Augustinas Sueris Date: Wed, 28 Aug 2024 09:19:13 +0300 Subject: [PATCH] Updated fractional flag test --- .../spec/openfeature/flagd/provider_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/providers/openfeature-flagd-provider/spec/openfeature/flagd/provider_spec.rb b/providers/openfeature-flagd-provider/spec/openfeature/flagd/provider_spec.rb index 65f5317..77433dd 100644 --- a/providers/openfeature-flagd-provider/spec/openfeature/flagd/provider_spec.rb +++ b/providers/openfeature-flagd-provider/spec/openfeature/flagd/provider_spec.rb @@ -123,17 +123,17 @@ it do fetch_value_with_targeting_key = ->(targeting_key) do - client.fetch_boolean_value( + client.fetch_string_value( flag_key: "color-palette-experiment", default_value: "#b91c1c", evaluation_context: OpenFeature::SDK::EvaluationContext.new(targeting_key: targeting_key) ) end - initial_value = fetch_value_with_targeting_key.call("123") - (0..2).to_a.each do # try with 1000 - expect(fetch_value_with_targeting_key.call("123")).to eq(initial_value) - end + expect(fetch_value_with_targeting_key.call("1234")).to eq("#b91c1c") + expect(fetch_value_with_targeting_key.call("qwe")).to eq("#0284c7") + expect(fetch_value_with_targeting_key.call("abcd")).to eq("#16a34a") + expect(fetch_value_with_targeting_key.call("rfv")).to eq("#b91c1c") end end