-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdelete-remove-containment.feature
More file actions
69 lines (58 loc) · 2.81 KB
/
delete-remove-containment.feature
File metadata and controls
69 lines (58 loc) · 2.81 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Feature: Delete containment triple when resource is deleted
Background: Set up container
* def testContainer = rootTestContainer.createContainer()
Scenario: Check that RDF resource is contained and deleted
* def exampleTurtle = karate.readAsString('../fixtures/example.ttl')
* def rdfResource = testContainer.createResource('.ttl', exampleTurtle, 'text/turtle');
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
And header Accept = 'text/turtle'
When method GET
Then status 200
And match parse(response, 'text/turtle', testContainer.url).members contains rdfResource.url
Given url rdfResource.url
And headers clients.alice.getAuthHeaders('DELETE', rdfResource.url)
When method DELETE
Then match [200, 202, 204, 205] contains responseStatus
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
And header Accept = 'text/turtle'
When method GET
Then status 200
And match parse(response, 'text/turtle', testContainer.url).members !contains rdfResource.url
Scenario: Check that container is contained and deleted
* def container = testContainer.createContainer()
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
And header Accept = 'text/turtle'
When method GET
Then status 200
And match parse(response, 'text/turtle', testContainer.url).members contains container.url
Given url container.url
And headers clients.alice.getAuthHeaders('DELETE', container.url)
When method DELETE
Then match [200, 202, 204, 205] contains responseStatus
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
And header Accept = 'text/turtle'
When method GET
Then status 200
And match parse(response, 'text/turtle', testContainer.url).members !contains container.url
Scenario: Check that text resource is contained and deleted
* def textResource = testContainer.createResource('.txt', 'DAHUT', 'text/plain');
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
And header Accept = 'text/turtle'
When method GET
Then status 200
And match parse(response, 'text/turtle', testContainer.url).members contains textResource.url
Given url textResource.url
And headers clients.alice.getAuthHeaders('DELETE', textResource.url)
When method DELETE
Then match [200, 202, 204, 205] contains responseStatus
Given url testContainer.url
And headers clients.alice.getAuthHeaders('GET', testContainer.url)
And header Accept = 'text/turtle'
When method GET
Then status 200
And match parse(response, 'text/turtle', testContainer.url).members !contains textResource.url