Last active
December 15, 2015 12:49
-
-
Save FranckSilvestre/5262957 to your computer and use it in GitHub Desktop.
Testing constraints in Grails version 2.1.1 vs version 2.1.2
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
void testConstraints() { | |
//... | |
Membre toto = new Membre() | |
// in version 2.1.2 or sup | |
assert !toto.validate() | |
assert "nullable" == toto.errors["prenom"].code | |
assert "nullable" == toto.errors["nom"].code | |
// in version 2.1.1 | |
assert !toto.validate() | |
assert "nullable" == toto.errors["prenom"] | |
assert "nullable" == toto.errors["nom"] | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment