Last active
November 21, 2019 01:03
-
-
Save mario-rezende-ifood/1cc87d8ac8e2217918de0c1fa2e9a69f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def 'Allow user access only for 18 over'(name, age, expected) { | |
given: 'user entity' | |
def user = new User(name, age) | |
when: 'validate user access' | |
def userCanAccess = AccessService().grantUser(user) | |
then: | |
userCanAccess == expected | |
where: | |
name | age | expected | |
'Fulano' | 18 | true | |
'Beltrano' | 19 | true | |
'Sicrano' | 17 | false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment