forked from Luracast/Restler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalidation.feature
32 lines (28 loc) · 920 Bytes
/
validation.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@param @type
Feature: Validation
Scenario Outline: Valid Password
Given that I send {"password":<password>}
And the request is sent as JSON
When I request "/tests/param/validation/pattern"
Then the response status code should be 200
And the response is JSON
And the type is "string"
And the response equals <password>
Examples:
| password |
| "1a" |
| "b2" |
| "some1" |
Scenario Outline: Invalid Password
Given that I send {"password":<password>}
And the request is sent as JSON
When I request "/tests/param/validation/pattern"
Then the response status code should be 400
And the response is JSON
And the type is "string"
And the response contains "Bad Request: Strong password with at least one alpha and one numeric character is required"
Examples:
| password |
| "arul" |
| "12345678" |
| "ONEtwo" |