-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathread-method-allow.feature
More file actions
34 lines (29 loc) · 1.29 KB
/
read-method-allow.feature
File metadata and controls
34 lines (29 loc) · 1.29 KB
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
Feature: Servers MUST return Allow for GET and HEAD
Background: Set up container
* def testContainer = rootTestContainer.createContainer()
* def exampleTurtle = karate.readAsString('../fixtures/example.ttl')
* def rdfResource = testContainer.createResource('.ttl', exampleTurtle, 'text/turtle');
Scenario: GET is allowed for containers
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
When method GET
Then match header allow contains 'GET'
And match header allow contains 'HEAD'
Scenario: GET is allowed for resources
Given url rdfResource.url
And headers clients.alice.getAuthHeaders('GET', rdfResource.url)
When method GET
Then match header allow contains 'GET'
And match header allow contains 'HEAD'
Scenario: HEAD is allowed for containers
Given url testContainer.url
And headers clients.alice.getAuthHeaders('HEAD', testContainer.url)
When method HEAD
Then match header allow contains 'GET'
And match header allow contains 'HEAD'
Scenario: HEAD is allowed for resources
Given url rdfResource.url
And headers clients.alice.getAuthHeaders('HEAD', rdfResource.url)
When method HEAD
Then match header allow contains 'GET'
And match header allow contains 'HEAD'