-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsnippets.yaml
86 lines (85 loc) · 2.66 KB
/
snippets.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: snippets
path: snippets/
headers:
Authorization: Token ${token}
requests:
- name: create
method: post
body:
title: Hello World
code: "print('hello world')"
style: "xcode"
language: "python"
vars:
snippet_id: ${{response.json()["id"]}}
tests:
- !include tests/status_code_is_201.yaml
- !include tests/response_time_2_seconds.yaml
- !include tests/url_in_content.yaml
- !include tests/id_in_content.yaml
- !include tests/highlight_in_content.yaml
- !include tests/owner_in_content.yaml
- !include tests/title_in_content.yaml
- !include tests/code_in_content.yaml
- !include tests/linenos_in_content.yaml
- !include tests/language_in_content.yaml
- !include tests/style_in_content.yaml
- name: details
path: ${snippet_id}/
tests:
- !include tests/status_code_is_200.yaml
- !include tests/response_time.yaml
- !include tests/url_in_content.yaml
- !include tests/id_in_content.yaml
- !include tests/highlight_in_content.yaml
- !include tests/owner_in_content.yaml
- !include tests/title_in_content.yaml
- !include tests/code_in_content.yaml
- !include tests/linenos_in_content.yaml
- !include tests/language_in_content.yaml
- !include tests/style_in_content.yaml
- name: update_with_patch
path: ${snippet_id}/
method: patch
body:
code: "print('hello, patch')"
tests:
- !include tests/status_code_is_200.yaml
- !include tests/response_time.yaml
- !include tests/url_in_content.yaml
- !include tests/id_in_content.yaml
- !include tests/highlight_in_content.yaml
- !include tests/owner_in_content.yaml
- !include tests/title_in_content.yaml
- !include tests/code_in_content.yaml
- !include tests/linenos_in_content.yaml
- !include tests/language_in_content.yaml
- !include tests/style_in_content.yaml
- name: snippet_update_with_put
path: ${snippet_id}/
method: put
body:
title: Hello World - Ruby
code: "puts 'hello world'"
style: "emacs"
language: "ruby"
tests:
- !include tests/status_code_is_200.yaml
- !include tests/response_time.yaml
- !include tests/url_in_content.yaml
- !include tests/id_in_content.yaml
- !include tests/highlight_in_content.yaml
- !include tests/owner_in_content.yaml
- !include tests/title_in_content.yaml
- !include tests/code_in_content.yaml
- !include tests/linenos_in_content.yaml
- !include tests/language_in_content.yaml
- !include tests/style_in_content.yaml
- name: delete
path: ${snippet_id}/
method: delete
tests:
- !include tests/status_code_is_204.yaml
- name: list_all
tests:
- !include tests/status_code_is_200.yaml