-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: this patches the strEndsWith test case #47
Conversation
…he string ends with rather than allowing the inverse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also change the test cases to use actual email addresses, to be a more realistic example?
client-specification/specifications/13-constraint-operators.json
Lines 451 to 515 in 756bccf
"description": "F3.endsWith should be enabled", | |
"context": { | |
"properties": { | |
"email": "@some-email.com" | |
} | |
}, | |
"toggleName": "F3.endsWith", | |
"expectedResult": true | |
}, | |
{ | |
"description": "F3.endsWith should be disabled when casing is incorrect", | |
"context": { | |
"properties": { | |
"email": "@some-EMAIL.com" | |
} | |
}, | |
"toggleName": "F3.endsWith", | |
"expectedResult": false | |
}, | |
{ | |
"description": "F3.endsWith.ignoringCase should be enabled", | |
"context": { | |
"properties": { | |
"email": "@SOME-EMAIL.com" | |
} | |
}, | |
"toggleName": "F3.endsWith.ignoringCase", | |
"expectedResult": true | |
}, | |
{ | |
"description": "F3.endsWith should be disabled", | |
"context": { | |
"properties": { | |
"email": "@another-email.com" | |
} | |
}, | |
"toggleName": "F3.endsWith", | |
"expectedResult": false | |
}, | |
{ | |
"description": "F4.contains should be enabled", | |
"context": { | |
"properties": { | |
"email": "@some-email.com" | |
} | |
}, | |
"toggleName": "F4.contains", | |
"expectedResult": true | |
}, | |
{ | |
"description": "F4.contains should be disabled", | |
"context": { | |
"properties": { | |
"email": "@another.com" | |
} | |
}, | |
"toggleName": "F4.contains", | |
"expectedResult": false | |
}, | |
{ | |
"description": "F4.contains.inverted should be enabled", | |
"context": { | |
"properties": { | |
"email": "@another.com" | |
} |
…r clarity reasons
Good suggestion! I've updated the tests to have a somewhat realistic email |
The strEndsWith test case was previously checking that @some-email.com ends with @some-email.com. This means that an incorrectly implemented SDK could check that the context property ended with the constraint property and still pass the specifications.
This patches that behaviour, meaning that dependent SDKs will now fail that test case correctly if the implementation is incorrect.