11{
2- "info" : {
3- "_postman_id" : " 9989b5be-13ba-4d22-8e43-d05dbf628e58" ,
4- "name" : " foo API test" ,
5- "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6- },
7- "item" : [
8- {
9- "name" : " add a foo" ,
10- "event" : [
11- {
12- "listen" : " test" ,
13- "script" : {
14- "id" : " a01534dc-6fc7-4c54-ba1d-6bcf311e5836" ,
15- "exec" : [
16- " pm.test(\" success status\" , () => pm.response.to.be.success );" ,
17- " " ,
18- " pm.test(\" name is correct\" , () => " ,
19- " pm.expect(pm.response.json().name).to.equal(\" Transformers\" ));" ,
20- " " ,
21- " pm.test(\" id was assigned\" , () => " ,
22- " pm.expect(pm.response.json().id).to.be.not.null );" ,
23- " " ,
24- " pm.variables.set(\" id\" , pm.response.json().id);"
25- ],
26- "type" : " text/javascript"
27- }
28- }
29- ],
30- "request" : {
31- "method" : " POST" ,
32- "header" : [
33- {
34- "key" : " Content-Type" ,
35- "name" : " Content-Type" ,
36- "value" : " application/json" ,
37- "type" : " text"
38- }
39- ],
40- "body" : {
41- "mode" : " raw" ,
42- "raw" : " {\n \" name\" : \" Transformers\"\n }"
43- },
44- "url" : {
45- "raw" : " http://localhost:8082/spring-boot-rest/auth/foos" ,
46- "protocol" : " http" ,
47- "host" : [
48- " localhost"
49- ],
50- "port" : " 8082" ,
51- "path" : [
52- " spring-boot-rest" ,
53- " auth" ,
54- " foos"
55- ]
56- }
57- },
58- "response" : []
59- },
60- {
61- "name" : " get a foo" ,
62- "event" : [
63- {
64- "listen" : " test" ,
65- "script" : {
66- "id" : " 03de440c-b483-4ab8-a11a-d0c99b349963" ,
67- "exec" : [
68- " pm.test(\" success status\" , () => pm.response.to.be.success );" ,
69- " " ,
70- " pm.test(\" name is correct\" , () => " ,
71- " pm.expect(pm.response.json().name).to.equal(\" Transformers\" ));" ,
72- " " ,
73- " pm.test(\" id is correct\" , () => " ,
74- " pm.expect(pm.response.json().id).to.equal(pm.variables.get(\" id\" )) );"
75- ],
76- "type" : " text/javascript"
77- }
78- }
79- ],
80- "request" : {
81- "method" : " GET" ,
82- "header" : [],
83- "body" : {
84- "mode" : " raw" ,
85- "raw" : " "
86- },
87- "url" : {
88- "raw" : " http://localhost:8082/spring-boot-rest/auth/foos/{{id}}" ,
89- "protocol" : " http" ,
90- "host" : [
91- " localhost"
92- ],
93- "port" : " 8082" ,
94- "path" : [
95- " spring-boot-rest" ,
96- " auth" ,
97- " foos" ,
98- " {{id}}"
99- ]
100- }
101- },
102- "response" : []
103- },
104- {
105- "name" : " delete a foo" ,
106- "event" : [
107- {
108- "listen" : " test" ,
109- "script" : {
110- "id" : " 74c1bb0f-c06c-48b1-a545-459233541b14" ,
111- "exec" : [
112- " pm.test(\" success status\" , () => pm.response.to.be.success );"
113- ],
114- "type" : " text/javascript"
115- }
116- }
117- ],
118- "request" : {
119- "method" : " DELETE" ,
120- "header" : [],
121- "body" : {
122- "mode" : " raw" ,
123- "raw" : " "
124- },
125- "url" : {
126- "raw" : " http://localhost:8082/spring-boot-rest/auth/foos/{{id}}" ,
127- "protocol" : " http" ,
128- "host" : [
129- " localhost"
130- ],
131- "port" : " 8082" ,
132- "path" : [
133- " spring-boot-rest" ,
134- " auth" ,
135- " foos" ,
136- " {{id}}"
137- ]
138- }
139- },
140- "response" : []
141- },
142- {
143- "name" : " verify delete" ,
144- "event" : [
145- {
146- "listen" : " test" ,
147- "script" : {
148- "id" : " 03de440c-b483-4ab8-a11a-d0c99b349963" ,
149- "exec" : [
150- " pm.test(\" status is 500\" , () => pm.response.to.have.status(500) );" ,
151- " " ,
152- " pm.test(\" no value present\" , () => " ,
153- " pm.expect(pm.response.json().cause).to.equal(\" No value present\" ));"
154- ],
155- "type" : " text/javascript"
156- }
157- }
158- ],
159- "request" : {
160- "method" : " GET" ,
161- "header" : [],
162- "body" : {
163- "mode" : " raw" ,
164- "raw" : " "
165- },
166- "url" : {
167- "raw" : " http://localhost:8082/spring-boot-rest/auth/foos/{{id}}" ,
168- "protocol" : " http" ,
169- "host" : [
170- " localhost"
171- ],
172- "port" : " 8082" ,
173- "path" : [
174- " spring-boot-rest" ,
175- " auth" ,
176- " foos" ,
177- " {{id}}"
178- ]
179- }
180- },
181- "response" : []
182- }
183- ]
2+ "info" : {
3+ "_postman_id" : " 9989b5be-13ba-4d22-8e43-d05dbf628e58" ,
4+ "name" : " foo API test" ,
5+ "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+ },
7+ "item" : [
8+ {
9+ "name" : " add a foo" ,
10+ "event" : [
11+ {
12+ "listen" : " test" ,
13+ "script" : {
14+ "id" : " a01534dc-6fc7-4c54-ba1d-6bcf311e5836" ,
15+ "exec" : [
16+ " pm.test(\" success status\" , () => pm.response.to.be.success );" ,
17+ " " ,
18+ " pm.test(\" name is correct\" , () => " ,
19+ " pm.expect(pm.response.json().name).to.equal(\" Transformers\" ));" ,
20+ " " ,
21+ " pm.test(\" id was assigned\" , () => " ,
22+ " pm.expect(pm.response.json().id).to.be.not.null );" ,
23+ " " ,
24+ " pm.variables.set(\" id\" , pm.response.json().id);"
25+ ],
26+ "type" : " text/javascript"
27+ }
28+ }
29+ ],
30+ "request" : {
31+ "method" : " POST" ,
32+ "header" : [
33+ {
34+ "key" : " Content-Type" ,
35+ "name" : " Content-Type" ,
36+ "value" : " application/json" ,
37+ "type" : " text"
38+ }
39+ ],
40+ "body" : {
41+ "mode" : " raw" ,
42+ "raw" : " {\n \" name\" : \" Transformers\"\n }"
43+ },
44+ "url" : {
45+ "raw" : " http://localhost:8082/spring-boot-rest/auth/foos" ,
46+ "protocol" : " http" ,
47+ "host" : [
48+ " localhost"
49+ ],
50+ "port" : " 8082" ,
51+ "path" : [
52+ " spring-boot-rest" ,
53+ " auth" ,
54+ " foos"
55+ ]
56+ }
57+ },
58+ "response" : []
59+ },
60+ {
61+ "name" : " get a foo" ,
62+ "event" : [
63+ {
64+ "listen" : " test" ,
65+ "script" : {
66+ "id" : " 03de440c-b483-4ab8-a11a-d0c99b349963" ,
67+ "exec" : [
68+ " pm.test(\" success status\" , () => pm.response.to.be.success );" ,
69+ " " ,
70+ " pm.test(\" name is correct\" , () => " ,
71+ " pm.expect(pm.response.json().name).to.equal(\" Transformers\" ));" ,
72+ " " ,
73+ " pm.test(\" id is correct\" , () => " ,
74+ " pm.expect(pm.response.json().id).to.equal(pm.variables.get(\" id\" )) );"
75+ ],
76+ "type" : " text/javascript"
77+ }
78+ }
79+ ],
80+ "request" : {
81+ "method" : " GET" ,
82+ "header" : [],
83+ "body" : {
84+ "mode" : " raw" ,
85+ "raw" : " "
86+ },
87+ "url" : {
88+ "raw" : " http://localhost:8082/spring-boot-rest/auth/foos/{{id}}" ,
89+ "protocol" : " http" ,
90+ "host" : [
91+ " localhost"
92+ ],
93+ "port" : " 8082" ,
94+ "path" : [
95+ " spring-boot-rest" ,
96+ " auth" ,
97+ " foos" ,
98+ " {{id}}"
99+ ]
100+ }
101+ },
102+ "response" : []
103+ },
104+ {
105+ "name" : " delete a foo" ,
106+ "event" : [
107+ {
108+ "listen" : " test" ,
109+ "script" : {
110+ "id" : " 74c1bb0f-c06c-48b1-a545-459233541b14" ,
111+ "exec" : [
112+ " pm.test(\" success status\" , () => pm.response.to.be.success );"
113+ ],
114+ "type" : " text/javascript"
115+ }
116+ }
117+ ],
118+ "request" : {
119+ "method" : " DELETE" ,
120+ "header" : [],
121+ "body" : {
122+ "mode" : " raw" ,
123+ "raw" : " "
124+ },
125+ "url" : {
126+ "raw" : " http://localhost:8082/spring-boot-rest/auth/foos/{{id}}" ,
127+ "protocol" : " http" ,
128+ "host" : [
129+ " localhost"
130+ ],
131+ "port" : " 8082" ,
132+ "path" : [
133+ " spring-boot-rest" ,
134+ " auth" ,
135+ " foos" ,
136+ " {{id}}"
137+ ]
138+ }
139+ },
140+ "response" : []
141+ },
142+ {
143+ "name" : " verify delete" ,
144+ "event" : [
145+ {
146+ "listen" : " test" ,
147+ "script" : {
148+ "id" : " 03de440c-b483-4ab8-a11a-d0c99b349963" ,
149+ "exec" : [
150+ " pm.test(\" status is 500\" , () => pm.response.to.have.status(500) );" ,
151+ " " ,
152+ " pm.test(\" no value present\" , () => " ,
153+ " pm.expect(pm.response.json().cause).to.equal(\" No value present\" ));"
154+ ],
155+ "type" : " text/javascript"
156+ }
157+ }
158+ ],
159+ "request" : {
160+ "method" : " GET" ,
161+ "header" : [],
162+ "body" : {
163+ "mode" : " raw" ,
164+ "raw" : " "
165+ },
166+ "url" : {
167+ "raw" : " http://localhost:8082/spring-boot-rest/auth/foos/{{id}}" ,
168+ "protocol" : " http" ,
169+ "host" : [
170+ " localhost"
171+ ],
172+ "port" : " 8082" ,
173+ "path" : [
174+ " spring-boot-rest" ,
175+ " auth" ,
176+ " foos" ,
177+ " {{id}}"
178+ ]
179+ }
180+ },
181+ "response" : []
182+ }
183+ ]
184184}
0 commit comments