Created
December 11, 2019 15:59
-
-
Save mariorez/b0015ebd1bf3f0fb1f217657f7356be7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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