-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_mock.feature
52 lines (37 loc) · 1.46 KB
/
_mock.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@ignore
Feature:
Background:
* def uuid = function(){ return java.util.UUID.randomUUID() + '' }
Scenario: pathMatches('/v1/cats')
* def responseStatus = 201
* def response = { id: '#(uuid())', name: 'Billie' }
Scenario: pathMatches('/v1/cats/{uuid}')
* def response = { id: '#(uuid())', name: 'Billie' }
Scenario: pathMatches('/v1/dogs')
* def responseStatus = 201
* def response = { id: '#(uuid())', name: 'Dummy' }
Scenario: pathMatches('/v1/dogs/{uuid}')
* def response = { id: '#(uuid())', name: 'Dummy' }
Scenario: pathMatches('/v1/binary')
* def responseHeaders = { 'Content-Type': 'application/octet-stream' }
* def Runner = Java.type('com.intuit.karate.mock.MockServerTest')
* def response = Runner.testBytes
Scenario: pathMatches('/v1/patch')
* def responseStatus = 422
* def response = { success: true }
Scenario: pathMatches('/v1/delete')
* def response = { success: true }
Scenario: pathMatches('/v1/deleteEmptyResponse')
* def response = ''
Scenario: pathMatches('/v1/commas')
* def response = { success: true }
Scenario: pathMatches('/v1/multiparams')
* def response = { success: true }
Scenario: pathMatches('/v1/german')
* def response = <name>Müller</name>
Scenario: pathMatches('/v1/encoding/{raw}')
* def response = { success: true }
Scenario: pathMatches('/v1/linefeed')
* def response = '\n{ "success": true }'
Scenario: pathMatches('/v1/spaces')
* def response = '\n \n'