[mod] tests:mehr tests für "service.member.validate_password"
This commit is contained in:
parent
a76f362c59
commit
f36a48f2d3
1 changed files with 152 additions and 4 deletions
|
@ -19,7 +19,7 @@ describe(
|
|||
}
|
||||
> = [
|
||||
{
|
||||
"name": "minimum_length:negative",
|
||||
"name": "minimum_length:pass",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
|
@ -38,7 +38,7 @@ describe(
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "minimum_lengt:positive",
|
||||
"name": "minimum_lengt:fail",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
|
@ -64,7 +64,7 @@ describe(
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "maximum_length:negative",
|
||||
"name": "maximum_length:pass",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
|
@ -83,7 +83,7 @@ describe(
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "maximum_lengt:positive",
|
||||
"name": "maximum_length:fail",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
|
@ -108,6 +108,154 @@ describe(
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "must_contain_letter:pass",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": null,
|
||||
"maximum_length": null,
|
||||
"must_contain_letter": true,
|
||||
"must_contain_number": false,
|
||||
"must_contain_special_character": false,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "01x34"
|
||||
},
|
||||
"output": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "must_contain_letter:fail",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": null,
|
||||
"maximum_length": null,
|
||||
"must_contain_letter": true,
|
||||
"must_contain_number": false,
|
||||
"must_contain_special_character": false,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "01234"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"incident": "lacks_letter",
|
||||
"details": {
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "must_contain_number:pass",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": null,
|
||||
"maximum_length": null,
|
||||
"must_contain_letter": false,
|
||||
"must_contain_number": true,
|
||||
"must_contain_special_character": false,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "ab0de"
|
||||
},
|
||||
"output": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "must_contain_number:fail",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": null,
|
||||
"maximum_length": null,
|
||||
"must_contain_letter": false,
|
||||
"must_contain_number": true,
|
||||
"must_contain_special_character": false,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "abcde"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"incident": "lacks_number",
|
||||
"details": {
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "must_contain_special_character:pass",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": null,
|
||||
"maximum_length": null,
|
||||
"must_contain_letter": false,
|
||||
"must_contain_number": false,
|
||||
"must_contain_special_character": true,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "01.34"
|
||||
},
|
||||
"output": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "must_contain_special_character:fail",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": null,
|
||||
"maximum_length": null,
|
||||
"must_contain_letter": false,
|
||||
"must_contain_number": false,
|
||||
"must_contain_special_character": true,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "01234"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"incident": "lacks_special_character",
|
||||
"details": {
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "oblique:pass",
|
||||
"input": {
|
||||
"conf": {
|
||||
"settings": {
|
||||
"password_policy": {
|
||||
"minimum_length": 8,
|
||||
"maximum_length": 12,
|
||||
"must_contain_letter": true,
|
||||
"must_contain_number": true,
|
||||
"must_contain_special_character": true,
|
||||
}
|
||||
}
|
||||
},
|
||||
"password": "eiB@oo7tuu"
|
||||
},
|
||||
"output": [
|
||||
]
|
||||
},
|
||||
];
|
||||
cases.forEach(
|
||||
case_ => {
|
||||
|
|
Loading…
Add table
Reference in a new issue