|
4368 | 4368 | "response": [] |
4369 | 4369 | }, |
4370 | 4370 | { |
4371 | | - "name": "Get one conversation", |
| 4371 | + "name": "Get conversations after message", |
4372 | 4372 | "event": [ |
4373 | 4373 | { |
4374 | 4374 | "listen": "test", |
|
4459 | 4459 | "response": [] |
4460 | 4460 | }, |
4461 | 4461 | { |
4462 | | - "name": "Get one conversation after reply", |
| 4462 | + "name": "Get conversations after reply", |
4463 | 4463 | "event": [ |
4464 | 4464 | { |
4465 | 4465 | "listen": "test", |
|
4496 | 4496 | } |
4497 | 4497 | }, |
4498 | 4498 | "response": [] |
| 4499 | + }, |
| 4500 | + { |
| 4501 | + "name": "See unknown user messages", |
| 4502 | + "event": [ |
| 4503 | + { |
| 4504 | + "listen": "test", |
| 4505 | + "script": { |
| 4506 | + "id": "fb2d9223-cac3-4d2d-9eea-4356b5a5ea8b", |
| 4507 | + "exec": [ |
| 4508 | + "var response = JSON.parse(responseBody);", |
| 4509 | + "", |
| 4510 | + "", |
| 4511 | + "pm.test(\"Status code is 404\", function () {", |
| 4512 | + " pm.response.to.have.status(404);", |
| 4513 | + "});", |
| 4514 | + "", |
| 4515 | + "tests[\"JSON return code is 404\"] = response.code == 404", |
| 4516 | + "", |
| 4517 | + "tests[\"success is false\"] = response.success == false", |
| 4518 | + "tests[\"Message is correct\"] = response.error.message == \"With user -1 not found\"", |
| 4519 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"NotFoundError\"" |
| 4520 | + ], |
| 4521 | + "type": "text/javascript" |
| 4522 | + } |
| 4523 | + } |
| 4524 | + ], |
| 4525 | + "request": { |
| 4526 | + "method": "POST", |
| 4527 | + "header": [], |
| 4528 | + "body": { |
| 4529 | + "mode": "raw", |
| 4530 | + "raw": "{\n \"from_uid\": \"message_me\",\n \"to_uid\": \"{{user_id}}\",\n \"content\": \"My Reply\"\n}", |
| 4531 | + "options": { |
| 4532 | + "raw": { |
| 4533 | + "language": "json" |
| 4534 | + } |
| 4535 | + } |
| 4536 | + }, |
| 4537 | + "url": { |
| 4538 | + "raw": "{{host}}/messages/see/-1", |
| 4539 | + "host": [ |
| 4540 | + "{{host}}" |
| 4541 | + ], |
| 4542 | + "path": [ |
| 4543 | + "messages", |
| 4544 | + "see", |
| 4545 | + "-1" |
| 4546 | + ] |
| 4547 | + } |
| 4548 | + }, |
| 4549 | + "response": [] |
| 4550 | + }, |
| 4551 | + { |
| 4552 | + "name": "See messages from message_me", |
| 4553 | + "event": [ |
| 4554 | + { |
| 4555 | + "listen": "test", |
| 4556 | + "script": { |
| 4557 | + "id": "17b9bbf3-703d-4a97-b512-25c04f8248c9", |
| 4558 | + "exec": [ |
| 4559 | + "var response = JSON.parse(responseBody);", |
| 4560 | + "", |
| 4561 | + "", |
| 4562 | + "pm.test(\"Status code is 200\", function () {", |
| 4563 | + " pm.response.to.have.status(200);", |
| 4564 | + "});", |
| 4565 | + "", |
| 4566 | + "tests[\"Message is correct\"] = response.message == \"Messages marked as seen.\"" |
| 4567 | + ], |
| 4568 | + "type": "text/javascript" |
| 4569 | + } |
| 4570 | + } |
| 4571 | + ], |
| 4572 | + "request": { |
| 4573 | + "method": "POST", |
| 4574 | + "header": [], |
| 4575 | + "body": { |
| 4576 | + "mode": "raw", |
| 4577 | + "raw": "{\n \"from_uid\": \"message_me\",\n \"to_uid\": \"{{user_id}}\",\n \"content\": \"My Reply\"\n}", |
| 4578 | + "options": { |
| 4579 | + "raw": { |
| 4580 | + "language": "json" |
| 4581 | + } |
| 4582 | + } |
| 4583 | + }, |
| 4584 | + "url": { |
| 4585 | + "raw": "{{host}}/messages/see/message_me", |
| 4586 | + "host": [ |
| 4587 | + "{{host}}" |
| 4588 | + ], |
| 4589 | + "path": [ |
| 4590 | + "messages", |
| 4591 | + "see", |
| 4592 | + "message_me" |
| 4593 | + ] |
| 4594 | + } |
| 4595 | + }, |
| 4596 | + "response": [] |
| 4597 | + }, |
| 4598 | + { |
| 4599 | + "name": "Get conversations after seeing messages", |
| 4600 | + "event": [ |
| 4601 | + { |
| 4602 | + "listen": "test", |
| 4603 | + "script": { |
| 4604 | + "id": "960b7ce1-2437-412c-b4dd-f0db3b562a6c", |
| 4605 | + "exec": [ |
| 4606 | + "var response = JSON.parse(responseBody);", |
| 4607 | + "", |
| 4608 | + "", |
| 4609 | + "pm.test(\"Status code is 200\", function () {", |
| 4610 | + " pm.response.to.have.status(200);", |
| 4611 | + "});", |
| 4612 | + "", |
| 4613 | + "tests[\"Conversations is empty\"] = response.conversations.length == 1", |
| 4614 | + "tests[\"Message is unseen because you received the message\"] = response.conversations[0].is_unseen == false", |
| 4615 | + "tests[\"Message content is correct\"] = response.conversations[0].last_message_content == \"My Reply\"", |
| 4616 | + "tests[\"With user is correct\"] = response.conversations[0].with_user.username == \"message_me\"" |
| 4617 | + ], |
| 4618 | + "type": "text/javascript" |
| 4619 | + } |
| 4620 | + } |
| 4621 | + ], |
| 4622 | + "request": { |
| 4623 | + "method": "GET", |
| 4624 | + "header": [], |
| 4625 | + "url": { |
| 4626 | + "raw": "{{host}}/conversations", |
| 4627 | + "host": [ |
| 4628 | + "{{host}}" |
| 4629 | + ], |
| 4630 | + "path": [ |
| 4631 | + "conversations" |
| 4632 | + ] |
| 4633 | + } |
| 4634 | + }, |
| 4635 | + "response": [] |
4499 | 4636 | } |
4500 | 4637 | ], |
4501 | 4638 | "protocolProfileBehavior": {} |
|
4658 | 4795 | ], |
4659 | 4796 | "variable": [ |
4660 | 4797 | { |
4661 | | - "id": "0d719212-693f-412b-8d0f-2f8b4d2449b7", |
| 4798 | + "id": "51a87d51-b3a6-4cde-9b11-1fe5ad7be7af", |
4662 | 4799 | "key": "host", |
4663 | 4800 | "value": "http://127.0.0.1:5000" |
4664 | 4801 | }, |
4665 | 4802 | { |
4666 | | - "id": "ace376bf-356d-480f-ac9c-9ec36db37847", |
| 4803 | + "id": "7cbb58d1-cad3-4e00-915f-53a6c467d991", |
4667 | 4804 | "key": "user_id", |
4668 | 4805 | "value": "" |
4669 | 4806 | }, |
4670 | 4807 | { |
4671 | | - "id": "ffa52d7f-f0b6-41fd-b9ec-d389df575d24", |
| 4808 | + "id": "693836fa-3848-4780-81c7-ad60a40700ae", |
4672 | 4809 | "key": "user_email", |
4673 | 4810 | "value": "foo@example.org" |
4674 | 4811 | }, |
4675 | 4812 | { |
4676 | | - "id": "979d1a03-d820-4611-8a78-5f8246321dd6", |
| 4813 | + "id": "02053d62-a0a9-40bb-8e6f-43d86eb1fa17", |
4677 | 4814 | "key": "user_username", |
4678 | 4815 | "value": "foo" |
4679 | 4816 | }, |
4680 | 4817 | { |
4681 | | - "id": "fde9178c-cfe4-45a0-b10d-cdaa482c6b04", |
| 4818 | + "id": "760554e4-b902-431a-b29b-03679009434c", |
4682 | 4819 | "key": "user_password", |
4683 | 4820 | "value": "admin" |
4684 | 4821 | }, |
4685 | 4822 | { |
4686 | | - "id": "b7bac1d5-3f76-498f-a26c-2f70e66dd3ef", |
| 4823 | + "id": "8d73261c-6557-4939-9718-c5f3ed186ea8", |
4687 | 4824 | "key": "user_firstname", |
4688 | 4825 | "value": "Foo" |
4689 | 4826 | }, |
4690 | 4827 | { |
4691 | | - "id": "7e1b40c3-5dd7-48e0-8963-cf1e82182f3e", |
| 4828 | + "id": "f7fa880d-6264-44f7-a8ce-c470ff077a83", |
4692 | 4829 | "key": "user_lastname", |
4693 | 4830 | "value": "Bar" |
4694 | 4831 | }, |
4695 | 4832 | { |
4696 | | - "id": "166c22c4-85f5-4ebc-b107-65c43015a6bf", |
| 4833 | + "id": "28f7acd5-c6b0-4e82-a04c-17371197787b", |
4697 | 4834 | "key": "debug_token", |
4698 | 4835 | "value": "xX69jules69Xx" |
4699 | 4836 | }, |
4700 | 4837 | { |
4701 | | - "id": "dd075e81-7f88-447e-8ce5-a49cc4343c9c", |
| 4838 | + "id": "ad555769-0803-4b30-a7a2-fdb9d582fd4d", |
4702 | 4839 | "key": "user_access_token", |
4703 | 4840 | "value": "" |
4704 | 4841 | }, |
4705 | 4842 | { |
4706 | | - "id": "8c67aae4-989e-4881-93d5-04ce840ca391", |
| 4843 | + "id": "bd3194a6-e6b3-4f1d-a3f5-bf41341dc093", |
4707 | 4844 | "key": "user_refresh_token", |
4708 | 4845 | "value": "" |
4709 | 4846 | }, |
4710 | 4847 | { |
4711 | | - "id": "9e1d6d72-eec2-4c9a-bfe7-a7fb747eb16f", |
| 4848 | + "id": "f35b0ce7-b46a-41ac-8c79-efa76178786e", |
4712 | 4849 | "key": "expired_token", |
4713 | 4850 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU" |
4714 | 4851 | }, |
4715 | 4852 | { |
4716 | | - "id": "15bc3df5-1ecb-451c-b6b1-3793752ac5ea", |
| 4853 | + "id": "e22e2d2f-a517-4b9b-890f-9393c8656aed", |
4717 | 4854 | "key": "user_orientation", |
4718 | 4855 | "value": "heterosexual" |
4719 | 4856 | }, |
4720 | 4857 | { |
4721 | | - "id": "d5bdf7cd-be04-4f7d-9180-8bcc7e2f072b", |
| 4858 | + "id": "2a8b6700-24d1-4ca6-b29c-d022b8a5fb8c", |
4722 | 4859 | "key": "user_bio", |
4723 | 4860 | "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." |
4724 | 4861 | }, |
4725 | 4862 | { |
4726 | | - "id": "1f55fa55-81a8-407e-a81b-848d6ed0a59a", |
| 4863 | + "id": "597a56c2-2530-4900-ae36-b3e10175d936", |
4727 | 4864 | "key": "user_gender", |
4728 | 4865 | "value": "male" |
4729 | 4866 | }, |
4730 | 4867 | { |
4731 | | - "id": "4a078274-7c01-496a-8369-b6721c03bd5a", |
| 4868 | + "id": "3c09e8cb-9e4a-4274-90fe-354196c4c64a", |
4732 | 4869 | "key": "user_birthdate", |
4733 | 4870 | "value": "06/04/1998" |
4734 | 4871 | }, |
4735 | 4872 | { |
4736 | | - "id": "3997d428-1157-4b69-9765-6a86f3d07457", |
| 4873 | + "id": "73a843d0-a43e-4829-92b4-099a8f86ae74", |
4737 | 4874 | "key": "user_lat", |
4738 | 4875 | "value": "44.8404" |
4739 | 4876 | }, |
4740 | 4877 | { |
4741 | | - "id": "30e174fa-6eea-4fde-b9bd-919d6d50f2b3", |
| 4878 | + "id": "3ad8f109-e36f-43dd-9f60-077a4fbe06b8", |
4742 | 4879 | "key": "user_lng", |
4743 | 4880 | "value": "-0.5805" |
4744 | 4881 | }, |
4745 | 4882 | { |
4746 | | - "id": "ae6d5c69-4bb7-4bf4-9bc8-52999dc780f7", |
| 4883 | + "id": "0a23376b-a2a7-4d5c-8cd4-ba2dcbdfbe58", |
4747 | 4884 | "key": "user_ip", |
4748 | 4885 | "value": "77.205.46.181" |
4749 | 4886 | } |
|
0 commit comments