Skip to content

Commit

Permalink
[UPDATE] edit room api of postman
Browse files Browse the repository at this point in the history
  • Loading branch information
mild-tn committed Oct 29, 2018
1 parent 92f7b0d commit 9eaddb2
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions postman/room_api.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,49 +112,39 @@
"});",
"",
"",
"pm.test(\"ทดสอบ id 1 \", function() {",
"pm.test(\"ได้รับข้อมูล ของ id ที่ 1 ถูกต้อง\", function() {",
" var room_arrange = {",
" id : 1",
" id : 1,",
" room_name: \"CB2301\",",
" room_code: \"RM2301\",",
" time_current: \"2018-10-30 21:00:00\",",
" user_id: 1",
" }",
" ",
" var jsonData = pm.response.json();",
" ",
" pm.expect(jsonData.id).to.eql(room_arrange.id);",
" pm.expect(jsonData.room_name).to.eql(room_arrange.room_name);",
" pm.expect(jsonData.room_code).to.eql(room_arrange.room_code);",
" pm.expect(jsonData.user_id).to.eql(room_arrange.user_id);",
"});",
"",
"pm.test(\"ทดสอบ id 5\", function() {",
"pm.test(\"ได้รับข้อมูล ของ id ที่ 5 ถูกต้อง\", function() {",
" var room_arrange = {",
" id : 5",
" id : 5,",
" room_name: \"CB2305\",",
" room_code: \"RM2305\",",
" time_current: \"2018-10-30 21:00:00\",",
" user_id: 5",
" }",
" ",
" var jsonData = pm.response.json();",
" ",
" pm.expect(jsonData.id).to.eql(room_arrange.id);",
" pm.expect(jsonData.room_name).to.eql(room_arrange.room_name);",
" pm.expect(jsonData.room_code).to.eql(room_arrange.room_code);",
" pm.expect(jsonData.user_id).to.eql(room_arrange.user_id);",
"});",
"",
"// pm.test(\"ทดสอบ id 1 \", function() {",
"// var data = JSON.parse(responseBody);",
"// console.log(data)",
"// var room_arrange = {",
"// id : 1",
"// }",
"// // tests[\"reponse กลับ ของ id \"+ data.id] = data.id == room_arrange.id",
"",
"// var jsonData = pm.response.json();",
"// var room = jsonData[1];",
" ",
"// pm.expect(data.id).to.eql(room_arrange.id);",
"// });",
"",
"// pm.test(\"ทดสอบ id 5\", function() {",
"// var data = JSON.parse(responseBody);",
"// var room_arrange = {",
"// id : 5",
"// }",
"// // tests[\"reponse กลับ ของ id \"+ data.id] = data.id == room_arrange.id",
"// });",
"",
"",
""
],
"type": "text/javascript"
Expand All @@ -179,7 +169,7 @@
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/room/1",
"raw": "http://localhost:8000/api/room/5",
"protocol": "http",
"host": [
"localhost"
Expand All @@ -188,7 +178,7 @@
"path": [
"api",
"room",
"1"
"5"
]
}
},
Expand Down

0 comments on commit 9eaddb2

Please sign in to comment.