Skip to content

Commit 2754553

Browse files
committed
Add metadata test
1 parent 1fc793a commit 2754553

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use open_feature::{
66
EvaluationReason, EvaluationResult, StructValue, Value,
77
};
88

9-
const NAME: &str = "configcat";
9+
const NAME: &str = "ConfigCatProvider";
1010

1111
/// The ConfigCat OpenFeature provider.
1212
///

tests/provider.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
use configcat::FileDataSource;
22
use configcat::OverrideBehavior::LocalOnly;
33
use configcat_openfeature_provider::ConfigCatProvider;
4+
use open_feature::provider::FeatureProvider;
45
use open_feature::{
56
EvaluationContext, EvaluationError, EvaluationErrorCode, EvaluationReason, OpenFeature,
67
StructValue,
78
};
89

10+
#[test]
11+
fn metadata() {
12+
let configcat_client = create_client();
13+
let provider = ConfigCatProvider::new(configcat_client);
14+
15+
assert_eq!("ConfigCatProvider", provider.metadata().name);
16+
}
17+
918
#[tokio::test]
1019
async fn eval_bool() {
1120
let mut api = OpenFeature::singleton_mut().await;

0 commit comments

Comments
 (0)