|
5225 | 5225 | } |
5226 | 5226 | }, |
5227 | 5227 | "response": [] |
| 5228 | + }, |
| 5229 | + { |
| 5230 | + "name": "Like message_me message", |
| 5231 | + "event": [ |
| 5232 | + { |
| 5233 | + "listen": "test", |
| 5234 | + "script": { |
| 5235 | + "id": "45228336-12aa-41a5-a29a-8548f20f17b5", |
| 5236 | + "exec": [ |
| 5237 | + "var response = JSON.parse(responseBody);", |
| 5238 | + "", |
| 5239 | + "", |
| 5240 | + "pm.test(\"Status code is 200\", function () {", |
| 5241 | + " pm.response.to.have.status(200);", |
| 5242 | + "});", |
| 5243 | + "", |
| 5244 | + "tests[\"Message is correct\"] = response.message == \"Liked message 2.\"" |
| 5245 | + ], |
| 5246 | + "type": "text/javascript" |
| 5247 | + } |
| 5248 | + } |
| 5249 | + ], |
| 5250 | + "request": { |
| 5251 | + "method": "POST", |
| 5252 | + "header": [], |
| 5253 | + "url": { |
| 5254 | + "raw": "{{host}}/messages/like/2", |
| 5255 | + "host": [ |
| 5256 | + "{{host}}" |
| 5257 | + ], |
| 5258 | + "path": [ |
| 5259 | + "messages", |
| 5260 | + "like", |
| 5261 | + "2" |
| 5262 | + ] |
| 5263 | + } |
| 5264 | + }, |
| 5265 | + "response": [] |
| 5266 | + }, |
| 5267 | + { |
| 5268 | + "name": "Get conversation with yourself", |
| 5269 | + "event": [ |
| 5270 | + { |
| 5271 | + "listen": "test", |
| 5272 | + "script": { |
| 5273 | + "id": "358bff1a-c455-4edb-8021-8ffd85ba810c", |
| 5274 | + "exec": [ |
| 5275 | + "var response = JSON.parse(responseBody);", |
| 5276 | + "", |
| 5277 | + "", |
| 5278 | + "pm.test(\"Status code is 400\", function () {", |
| 5279 | + " pm.response.to.have.status(400);", |
| 5280 | + "});", |
| 5281 | + "", |
| 5282 | + "tests[\"JSON return code is 400\"] = response.code == 400", |
| 5283 | + "", |
| 5284 | + "tests[\"success is false\"] = response.success == false", |
| 5285 | + "tests[\"Message is correct\"] = response.error.message == \"Cannot get conversation with yourself. Get a life...\"", |
| 5286 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"BadRequestError\"" |
| 5287 | + ], |
| 5288 | + "type": "text/javascript" |
| 5289 | + } |
| 5290 | + } |
| 5291 | + ], |
| 5292 | + "request": { |
| 5293 | + "method": "GET", |
| 5294 | + "header": [], |
| 5295 | + "url": { |
| 5296 | + "raw": "{{host}}/conversations/{{user_username}}", |
| 5297 | + "host": [ |
| 5298 | + "{{host}}" |
| 5299 | + ], |
| 5300 | + "path": [ |
| 5301 | + "conversations", |
| 5302 | + "{{user_username}}" |
| 5303 | + ] |
| 5304 | + } |
| 5305 | + }, |
| 5306 | + "response": [] |
| 5307 | + }, |
| 5308 | + { |
| 5309 | + "name": "Get conversation with message_me", |
| 5310 | + "event": [ |
| 5311 | + { |
| 5312 | + "listen": "test", |
| 5313 | + "script": { |
| 5314 | + "id": "208cbcfd-f990-4a68-9d3d-56946ebd7f13", |
| 5315 | + "exec": [ |
| 5316 | + "var response = JSON.parse(responseBody);", |
| 5317 | + "", |
| 5318 | + "", |
| 5319 | + "pm.test(\"Status code is 200\", function () {", |
| 5320 | + " pm.response.to.have.status(200);", |
| 5321 | + "});", |
| 5322 | + "", |
| 5323 | + "tests[\"Conversations is empty\"] = response.messages.length == 2", |
| 5324 | + "tests[\"First message content\"] = response.messages[0].content == \"Hello World !\"", |
| 5325 | + "tests[\"Second message content\"] = response.messages[1].content == \"My Reply\"", |
| 5326 | + "tests[\"First message is_liked\"] = response.messages[0].is_liked == false", |
| 5327 | + "tests[\"Second message is liked\"] = response.messages[1].is_liked == true", |
| 5328 | + "tests[\"First message is seen\"] = response.messages[0].is_seen == false", |
| 5329 | + "tests[\"Second message is seen\"] = response.messages[1].is_seen == true", |
| 5330 | + "", |
| 5331 | + "" |
| 5332 | + ], |
| 5333 | + "type": "text/javascript" |
| 5334 | + } |
| 5335 | + } |
| 5336 | + ], |
| 5337 | + "request": { |
| 5338 | + "method": "GET", |
| 5339 | + "header": [], |
| 5340 | + "url": { |
| 5341 | + "raw": "{{host}}/conversations/message_me", |
| 5342 | + "host": [ |
| 5343 | + "{{host}}" |
| 5344 | + ], |
| 5345 | + "path": [ |
| 5346 | + "conversations", |
| 5347 | + "message_me" |
| 5348 | + ] |
| 5349 | + } |
| 5350 | + }, |
| 5351 | + "response": [] |
| 5352 | + }, |
| 5353 | + { |
| 5354 | + "name": "Send message to message_me2", |
| 5355 | + "event": [ |
| 5356 | + { |
| 5357 | + "listen": "test", |
| 5358 | + "script": { |
| 5359 | + "id": "e106fa57-56de-4eb6-b564-5197e097ad91", |
| 5360 | + "exec": [ |
| 5361 | + "var response = JSON.parse(responseBody);", |
| 5362 | + "", |
| 5363 | + "", |
| 5364 | + "pm.test(\"Status code is 200\", function () {", |
| 5365 | + " pm.response.to.have.status(200);", |
| 5366 | + "});", |
| 5367 | + "", |
| 5368 | + "tests[\"Message is correct\"] = response.message == \"Message successfully sent to message_me2.\"" |
| 5369 | + ], |
| 5370 | + "type": "text/javascript" |
| 5371 | + } |
| 5372 | + } |
| 5373 | + ], |
| 5374 | + "request": { |
| 5375 | + "method": "POST", |
| 5376 | + "header": [], |
| 5377 | + "body": { |
| 5378 | + "mode": "raw", |
| 5379 | + "raw": "{\n \"to_uid\": \"message_me2\",\n \"content\": \"Hello World 2 !\"\n}", |
| 5380 | + "options": { |
| 5381 | + "raw": { |
| 5382 | + "language": "json" |
| 5383 | + } |
| 5384 | + } |
| 5385 | + }, |
| 5386 | + "url": { |
| 5387 | + "raw": "{{host}}/messages/send", |
| 5388 | + "host": [ |
| 5389 | + "{{host}}" |
| 5390 | + ], |
| 5391 | + "path": [ |
| 5392 | + "messages", |
| 5393 | + "send" |
| 5394 | + ] |
| 5395 | + } |
| 5396 | + }, |
| 5397 | + "response": [] |
| 5398 | + }, |
| 5399 | + { |
| 5400 | + "name": "Get conversations after message to 2", |
| 5401 | + "event": [ |
| 5402 | + { |
| 5403 | + "listen": "test", |
| 5404 | + "script": { |
| 5405 | + "id": "f7240da9-b01f-4485-81ab-8461fb6bb138", |
| 5406 | + "exec": [ |
| 5407 | + "var response = JSON.parse(responseBody);", |
| 5408 | + "", |
| 5409 | + "", |
| 5410 | + "pm.test(\"Status code is 200\", function () {", |
| 5411 | + " pm.response.to.have.status(200);", |
| 5412 | + "});", |
| 5413 | + "", |
| 5414 | + "tests[\"Conversations is empty\"] = response.conversations.length == 2", |
| 5415 | + "tests[\"Message is not unseen because you send the message so it's not notified\"] = response.conversations[0].is_unseen == false", |
| 5416 | + "tests[\"Message content is correct\"] = response.conversations[1].last_message_content == \"Hello World 2 !\"", |
| 5417 | + "tests[\"With user is correct\"] = response.conversations[1].with_user.username == \"message_me2\"" |
| 5418 | + ], |
| 5419 | + "type": "text/javascript" |
| 5420 | + } |
| 5421 | + } |
| 5422 | + ], |
| 5423 | + "request": { |
| 5424 | + "method": "GET", |
| 5425 | + "header": [], |
| 5426 | + "url": { |
| 5427 | + "raw": "{{host}}/conversations", |
| 5428 | + "host": [ |
| 5429 | + "{{host}}" |
| 5430 | + ], |
| 5431 | + "path": [ |
| 5432 | + "conversations" |
| 5433 | + ] |
| 5434 | + } |
| 5435 | + }, |
| 5436 | + "response": [] |
5228 | 5437 | } |
5229 | 5438 | ], |
5230 | 5439 | "protocolProfileBehavior": {} |
|
5387 | 5596 | ], |
5388 | 5597 | "variable": [ |
5389 | 5598 | { |
5390 | | - "id": "5fcfdcdb-328d-498f-8380-16a9b5bdca8a", |
| 5599 | + "id": "3e3e4438-8401-4003-abcf-5d074c05f462", |
5391 | 5600 | "key": "host", |
5392 | 5601 | "value": "http://127.0.0.1:5000" |
5393 | 5602 | }, |
5394 | 5603 | { |
5395 | | - "id": "dab86578-2e2b-41a2-88d4-409e525be120", |
| 5604 | + "id": "474531ad-c989-4d92-8542-337ce9b010e1", |
5396 | 5605 | "key": "user_id", |
5397 | 5606 | "value": "" |
5398 | 5607 | }, |
5399 | 5608 | { |
5400 | | - "id": "c7febd70-a041-480e-90e1-0d6ea277d21f", |
| 5609 | + "id": "072156e0-a96d-451f-abf8-f77280d4ffda", |
5401 | 5610 | "key": "user_email", |
5402 | 5611 | "value": "foo@example.org" |
5403 | 5612 | }, |
5404 | 5613 | { |
5405 | | - "id": "5e40a0df-d248-4a66-9e7f-d3a1a103b283", |
| 5614 | + "id": "3f4e4d49-011e-453c-9117-b0a38d6adcb3", |
5406 | 5615 | "key": "user_username", |
5407 | 5616 | "value": "foo" |
5408 | 5617 | }, |
5409 | 5618 | { |
5410 | | - "id": "38c7c7a1-e11a-4b48-8c0c-86eba67b559d", |
| 5619 | + "id": "e9a11cb6-74ce-42a5-8450-47fd021358e8", |
5411 | 5620 | "key": "user_password", |
5412 | 5621 | "value": "admin" |
5413 | 5622 | }, |
5414 | 5623 | { |
5415 | | - "id": "ac4bd9d8-eb4a-4eab-b5cf-18cfc0570ba3", |
| 5624 | + "id": "1075fff5-b05b-4050-922d-00549dd85896", |
5416 | 5625 | "key": "user_firstname", |
5417 | 5626 | "value": "Foo" |
5418 | 5627 | }, |
5419 | 5628 | { |
5420 | | - "id": "62ba5bdf-3d88-47e4-ab81-3cb55c5afcc3", |
| 5629 | + "id": "f792f8dc-f93f-422d-af8e-aadf547442a3", |
5421 | 5630 | "key": "user_lastname", |
5422 | 5631 | "value": "Bar" |
5423 | 5632 | }, |
5424 | 5633 | { |
5425 | | - "id": "735e4af6-1136-4c7a-b26f-d872b3054d5a", |
| 5634 | + "id": "9b71ed57-93df-404e-baf0-35ec160bf68d", |
5426 | 5635 | "key": "debug_token", |
5427 | 5636 | "value": "xX69jules69Xx" |
5428 | 5637 | }, |
5429 | 5638 | { |
5430 | | - "id": "c3bf9057-c4fd-47f4-9be3-870e097c5d27", |
| 5639 | + "id": "da9ec2ea-a081-49e1-862b-95b0dc2b2bb7", |
5431 | 5640 | "key": "user_access_token", |
5432 | 5641 | "value": "" |
5433 | 5642 | }, |
5434 | 5643 | { |
5435 | | - "id": "4c6d5f6a-6502-4a17-ae46-6f8d197b66d9", |
| 5644 | + "id": "66dd29f6-acb0-4886-8391-b0c6f20d3956", |
5436 | 5645 | "key": "user_refresh_token", |
5437 | 5646 | "value": "" |
5438 | 5647 | }, |
5439 | 5648 | { |
5440 | | - "id": "e15b42ce-f7a7-4c84-b95c-4a276ac81dbb", |
| 5649 | + "id": "d6e6a5c5-4d70-465c-8d89-b8845a7a6d20", |
5441 | 5650 | "key": "expired_token", |
5442 | 5651 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU" |
5443 | 5652 | }, |
5444 | 5653 | { |
5445 | | - "id": "e800e15b-b380-45bc-92b8-a03ddd47c2af", |
| 5654 | + "id": "e7b3105e-0c77-41bf-9444-d83010cb5edf", |
5446 | 5655 | "key": "user_orientation", |
5447 | 5656 | "value": "heterosexual" |
5448 | 5657 | }, |
5449 | 5658 | { |
5450 | | - "id": "62dae0ab-ab8c-41e2-8d0d-d8becc86493a", |
| 5659 | + "id": "35bff664-ee13-4ad1-84b8-ceec64e1115f", |
5451 | 5660 | "key": "user_bio", |
5452 | 5661 | "value": "Lorem Ipsum is the single greatest threat. We are not - we are not keeping up with other websites. Lorem Ipsum best not make any more threats to your website. It will be met with fire and fury like the world has never seen. Does everybody know that pig named Lorem Ipsum? An ‘extremely credible source’ has called my office and told me that Barack Obama’s placeholder text is a fraud." |
5453 | 5662 | }, |
5454 | 5663 | { |
5455 | | - "id": "c001f9e7-1711-4126-83a1-8a7429e24484", |
| 5664 | + "id": "7dc06bee-b732-42b7-9323-d00a15906a34", |
5456 | 5665 | "key": "user_gender", |
5457 | 5666 | "value": "male" |
5458 | 5667 | }, |
5459 | 5668 | { |
5460 | | - "id": "811072c0-a31a-4f0a-a62b-6b2e485bfb5a", |
| 5669 | + "id": "070c3cca-ff6a-48da-8adc-aef32fc0ef32", |
5461 | 5670 | "key": "user_birthdate", |
5462 | 5671 | "value": "06/04/1998" |
5463 | 5672 | }, |
5464 | 5673 | { |
5465 | | - "id": "bf3cd0e3-4f1f-45f3-ba16-c376b3f50d28", |
| 5674 | + "id": "1f84e84c-4b02-4fa9-8e80-21988282ee29", |
5466 | 5675 | "key": "user_lat", |
5467 | 5676 | "value": "44.8404" |
5468 | 5677 | }, |
5469 | 5678 | { |
5470 | | - "id": "8bcf8b8c-798d-497b-a3d7-e92639ed55d1", |
| 5679 | + "id": "bc34d6a4-ca83-4f7a-b3de-e62290c1084d", |
5471 | 5680 | "key": "user_lng", |
5472 | 5681 | "value": "-0.5805" |
5473 | 5682 | }, |
5474 | 5683 | { |
5475 | | - "id": "688313b7-700a-4f16-bafe-c0ecb27ef1b6", |
| 5684 | + "id": "51ec8aee-c8a3-4bae-8fdb-b40aba5dabad", |
5476 | 5685 | "key": "user_ip", |
5477 | 5686 | "value": "77.205.46.181" |
5478 | 5687 | } |
|
0 commit comments