|
7 | 7 | RSpec.describe OpenFeature::SDK::Client do |
8 | 8 | subject(:client) { described_class.new(provider: provider, client_options: client_metadata) } |
9 | 9 | let(:provider) { OpenFeature::SDK::Provider::NoOpProvider.new } |
10 | | - let(:client_metadata) { OpenFeature::SDK::Metadata.new(name: name) } |
11 | | - let(:name) { "my-openfeature-client" } |
| 10 | + let(:client_metadata) { OpenFeature::SDK::Metadata.new(domain: domain) } |
| 11 | + let(:domain) { "my-openfeature-client" } |
12 | 12 |
|
13 | 13 | context "Requirement 1.2.1" do |
14 | 14 | before do |
|
24 | 24 | end |
25 | 25 |
|
26 | 26 | context "Requirement 1.2.2" do |
27 | | - it "MUST define a metadata member or accessor, containing an immutable name field or accessor of type string, which corresponds to the name value supplied during client creation." do |
| 27 | + it "MUST define a metadata member or accessor, containing an immutable domain field or accessor of type string, which corresponds to the domain value supplied during client creation." do |
28 | 28 | expect(client).to respond_to(:metadata) |
29 | | - expect(client.metadata).to respond_to(:name) |
30 | | - expect(client.metadata.name).to eq(name) |
| 29 | + expect(client.metadata).to respond_to(:domain) |
| 30 | + expect(client.metadata.domain).to eq(domain) |
31 | 31 | end |
32 | 32 | end |
33 | 33 |
|
|
195 | 195 |
|
196 | 196 | it do |
197 | 197 | expect(client.fetch_object_details(flag_key: flag_key, |
198 | | - default_value: {name: "some-name"})).is_a?(OpenFeature::SDK::Provider::ResolutionDetails) |
| 198 | + default_value: {domain: "some-domain"})).is_a?(OpenFeature::SDK::Provider::ResolutionDetails) |
199 | 199 | end |
200 | 200 | end |
201 | 201 |
|
202 | 202 | context "Requirement 1.4.2" do |
203 | 203 | it "The evaluation details structure's value field MUST contain the evaluated flag value" do |
204 | 204 | expect(client.fetch_object_details(flag_key: flag_key, |
205 | | - default_value: {name: "some-name"}).value).is_a?(String) |
| 205 | + default_value: {domain: "some-domain"}).value).is_a?(String) |
206 | 206 | end |
207 | 207 | end |
208 | 208 |
|
|
0 commit comments