From 2dbe00e51f9b6fb4866f53d4c3809f319f039b37 Mon Sep 17 00:00:00 2001 From: Michael Berkowitz Date: Mon, 17 Apr 2023 14:17:16 -0400 Subject: [PATCH] Add integration tests to confirm that values checked against a string list are converted to strings first --- tests/0.1.2/enabled.yaml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/0.1.2/enabled.yaml b/tests/0.1.2/enabled.yaml index 4c13e00..92b1511 100644 --- a/tests/0.1.2/enabled.yaml +++ b/tests/0.1.2/enabled.yaml @@ -341,4 +341,28 @@ tests: properties: domain: "example.com" expected: - value: false \ No newline at end of file + value: false + + ############################ + ## STRING LIST BEHAVIOUR ## + ############################ + + - name: returns true when a non-string version of a matching string is given + client: feature_flag_client + function: enabled + input: + flag: "feature-flag.string-list" + properties: + team_name: 1 + expected: + value: true + + - name: returns false when a non-matching element is given + client: feature_flag_client + function: enabled + input: + flag: "feature-flag.string-list" + properties: + team_name: 2 + expected: + value: false