|
5474 | 5474 | "header": [ |
5475 | 5475 | { |
5476 | 5476 | "key": "debug-auth-token", |
5477 | | - "value": "xX69jules69Xx", |
| 5477 | + "value": "{{debug_token}}", |
5478 | 5478 | "type": "text" |
5479 | 5479 | } |
5480 | 5480 | ], |
|
5593 | 5593 | } |
5594 | 5594 | }, |
5595 | 5595 | "response": [] |
| 5596 | + }, |
| 5597 | + { |
| 5598 | + "name": "Debug set superlikes to 1 left", |
| 5599 | + "event": [ |
| 5600 | + { |
| 5601 | + "listen": "test", |
| 5602 | + "script": { |
| 5603 | + "id": "4ef760e7-8c5c-4b52-ba94-cb6bd55b7bfb", |
| 5604 | + "exec": [ |
| 5605 | + "pm.test(\"Status code is 200\", function () {", |
| 5606 | + " pm.response.to.have.status(200);", |
| 5607 | + "});" |
| 5608 | + ], |
| 5609 | + "type": "text/javascript" |
| 5610 | + } |
| 5611 | + } |
| 5612 | + ], |
| 5613 | + "request": { |
| 5614 | + "method": "POST", |
| 5615 | + "header": [ |
| 5616 | + { |
| 5617 | + "key": "debug-auth-token", |
| 5618 | + "value": "{{debug_token}}", |
| 5619 | + "type": "text" |
| 5620 | + } |
| 5621 | + ], |
| 5622 | + "body": { |
| 5623 | + "mode": "raw", |
| 5624 | + "raw": "", |
| 5625 | + "options": { |
| 5626 | + "raw": { |
| 5627 | + "language": "json" |
| 5628 | + } |
| 5629 | + } |
| 5630 | + }, |
| 5631 | + "url": { |
| 5632 | + "raw": "{{host}}/debug/superlikes_set/{{id}}/1", |
| 5633 | + "host": [ |
| 5634 | + "{{host}}" |
| 5635 | + ], |
| 5636 | + "path": [ |
| 5637 | + "debug", |
| 5638 | + "superlikes_set", |
| 5639 | + "{{id}}", |
| 5640 | + "1" |
| 5641 | + ] |
| 5642 | + } |
| 5643 | + }, |
| 5644 | + "response": [] |
| 5645 | + }, |
| 5646 | + { |
| 5647 | + "name": "Superlike user 1500", |
| 5648 | + "event": [ |
| 5649 | + { |
| 5650 | + "listen": "test", |
| 5651 | + "script": { |
| 5652 | + "id": "67051601-b827-4fd4-91ba-20470edf9c1a", |
| 5653 | + "exec": [ |
| 5654 | + "var response = JSON.parse(responseBody);", |
| 5655 | + "", |
| 5656 | + "", |
| 5657 | + "pm.test(\"Status code is 200\", function () {", |
| 5658 | + " pm.response.to.have.status(200);", |
| 5659 | + "});", |
| 5660 | + "", |
| 5661 | + "tests[\"Success is true\"] = response.success == true", |
| 5662 | + "tests[\"Message is correct\"] = response.message == \"It's a match !\"" |
| 5663 | + ], |
| 5664 | + "type": "text/javascript" |
| 5665 | + } |
| 5666 | + } |
| 5667 | + ], |
| 5668 | + "request": { |
| 5669 | + "method": "POST", |
| 5670 | + "header": [], |
| 5671 | + "body": { |
| 5672 | + "mode": "raw", |
| 5673 | + "raw": "{\n \"is_superlike\": true\n}", |
| 5674 | + "options": { |
| 5675 | + "raw": { |
| 5676 | + "language": "json" |
| 5677 | + } |
| 5678 | + } |
| 5679 | + }, |
| 5680 | + "url": { |
| 5681 | + "raw": "{{host}}/like/1500", |
| 5682 | + "host": [ |
| 5683 | + "{{host}}" |
| 5684 | + ], |
| 5685 | + "path": [ |
| 5686 | + "like", |
| 5687 | + "1500" |
| 5688 | + ] |
| 5689 | + } |
| 5690 | + }, |
| 5691 | + "response": [] |
| 5692 | + }, |
| 5693 | + { |
| 5694 | + "name": "Superlike no left", |
| 5695 | + "event": [ |
| 5696 | + { |
| 5697 | + "listen": "test", |
| 5698 | + "script": { |
| 5699 | + "id": "6324057b-8477-403b-9387-eeb091f73d19", |
| 5700 | + "exec": [ |
| 5701 | + "var response = JSON.parse(responseBody);", |
| 5702 | + "", |
| 5703 | + "", |
| 5704 | + "pm.test(\"Status code is 400\", function () {", |
| 5705 | + " pm.response.to.have.status(400);", |
| 5706 | + "});", |
| 5707 | + "", |
| 5708 | + "tests[\"JSON return code is 400\"] = response.code == 400", |
| 5709 | + "", |
| 5710 | + "tests[\"success is true\"] = response.success == false", |
| 5711 | + "tests[\"Message is correct\"] = response.error.message.includes(\"No more superlikes today, come back in \")", |
| 5712 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"BadRequestError\"" |
| 5713 | + ], |
| 5714 | + "type": "text/javascript" |
| 5715 | + } |
| 5716 | + } |
| 5717 | + ], |
| 5718 | + "request": { |
| 5719 | + "method": "POST", |
| 5720 | + "header": [], |
| 5721 | + "body": { |
| 5722 | + "mode": "raw", |
| 5723 | + "raw": "{\n \"is_superlike\": true\n}", |
| 5724 | + "options": { |
| 5725 | + "raw": { |
| 5726 | + "language": "json" |
| 5727 | + } |
| 5728 | + } |
| 5729 | + }, |
| 5730 | + "url": { |
| 5731 | + "raw": "{{host}}/like/1500", |
| 5732 | + "host": [ |
| 5733 | + "{{host}}" |
| 5734 | + ], |
| 5735 | + "path": [ |
| 5736 | + "like", |
| 5737 | + "1500" |
| 5738 | + ] |
| 5739 | + } |
| 5740 | + }, |
| 5741 | + "response": [] |
5596 | 5742 | } |
5597 | 5743 | ], |
5598 | 5744 | "protocolProfileBehavior": {} |
@@ -5632,132 +5778,132 @@ |
5632 | 5778 | ], |
5633 | 5779 | "variable": [ |
5634 | 5780 | { |
5635 | | - "id": "3eff2f3b-b570-4035-b7e8-4ad3d395adfa", |
| 5781 | + "id": "d2836a81-379c-471a-879a-0ec35627f1eb", |
5636 | 5782 | "key": "host", |
5637 | 5783 | "value": "http://127.0.0.1:5000" |
5638 | 5784 | }, |
5639 | 5785 | { |
5640 | | - "id": "31166173-97dd-46c7-a4d1-45b8db8721a9", |
| 5786 | + "id": "cf08785e-2faa-4691-a7dc-ad9abcadcd7b", |
5641 | 5787 | "key": "access_token", |
5642 | 5788 | "value": "" |
5643 | 5789 | }, |
5644 | 5790 | { |
5645 | | - "id": "936999f6-0ec5-43eb-a6c7-f745638f88c4", |
| 5791 | + "id": "814092af-c3f2-4f56-848d-d6ac90447841", |
5646 | 5792 | "key": "refresh_token", |
5647 | 5793 | "value": "" |
5648 | 5794 | }, |
5649 | 5795 | { |
5650 | | - "id": "60f7bd6d-518b-465c-b2ff-37ad9a8ddcaa", |
| 5796 | + "id": "b543710c-cfde-44f4-9b8e-857c5eb485f8", |
5651 | 5797 | "key": "debug_token", |
5652 | 5798 | "value": "xX69jules69Xx" |
5653 | 5799 | }, |
5654 | 5800 | { |
5655 | | - "id": "289a75db-1846-4d46-99c5-ef9f287c803f", |
| 5801 | + "id": "88072eea-0d20-4ca4-97e0-c2ee618491c0", |
5656 | 5802 | "key": "id", |
5657 | 5803 | "value": "1541" |
5658 | 5804 | }, |
5659 | 5805 | { |
5660 | | - "id": "981eba27-dc15-46ba-8c15-3cd5ed7f006e", |
| 5806 | + "id": "a7643c8d-8323-4dcb-936f-42ff74141ec6", |
5661 | 5807 | "key": "first_name", |
5662 | 5808 | "value": "Jules" |
5663 | 5809 | }, |
5664 | 5810 | { |
5665 | | - "id": "0d6019e2-229d-403e-a6d2-cacaa6ad05a3", |
| 5811 | + "id": "84b578cb-e9a3-4c07-a5f2-5b198f556b96", |
5666 | 5812 | "key": "last_name", |
5667 | 5813 | "value": "Lasne" |
5668 | 5814 | }, |
5669 | 5815 | { |
5670 | | - "id": "838a135d-43a3-4fd6-8895-5287f1dc6f43", |
| 5816 | + "id": "3b9d4fd5-8e62-4fad-b8d5-25f2efc78075", |
5671 | 5817 | "key": "email", |
5672 | 5818 | "value": "jules.lasne@example.org" |
5673 | 5819 | }, |
5674 | 5820 | { |
5675 | | - "id": "8db08c45-ce5e-4540-a89d-2e6d7776f549", |
| 5821 | + "id": "5a52ea01-6390-4855-8cfc-924dc812ce77", |
5676 | 5822 | "key": "username", |
5677 | 5823 | "value": "seluj78" |
5678 | 5824 | }, |
5679 | 5825 | { |
5680 | | - "id": "667bb129-e473-4b14-b675-621b472f8651", |
| 5826 | + "id": "d20c5305-34bc-4b03-9690-6a81b7d834d5", |
5681 | 5827 | "key": "password", |
5682 | 5828 | "value": "dolphin" |
5683 | 5829 | }, |
5684 | 5830 | { |
5685 | | - "id": "b600f2f9-0a1a-4de6-8167-e864069c8b99", |
| 5831 | + "id": "650958e2-c132-400e-b8d2-49906afa8f22", |
5686 | 5832 | "key": "orientation", |
5687 | 5833 | "value": "heterosexual" |
5688 | 5834 | }, |
5689 | 5835 | { |
5690 | | - "id": "c7100dc6-846b-4b03-9d41-76322835821a", |
| 5836 | + "id": "f7670021-1990-40e2-8249-c9b5fea152d6", |
5691 | 5837 | "key": "gender", |
5692 | 5838 | "value": "male" |
5693 | 5839 | }, |
5694 | 5840 | { |
5695 | | - "id": "b4254536-0414-481c-854e-bc56144ccbf4", |
| 5841 | + "id": "90bed931-868e-4b24-b573-71a7233bba36", |
5696 | 5842 | "key": "bio", |
5697 | 5843 | "value": "Phasellus vel tortor vel elit scelerisque accumsan vel nec nunc. Ut condimentum vestibulum sapien non dictum. Vestibulum ac eleifend mi. Curabitur dictum vestibulum ex at placerat. Pellentesque odio mi, condimentum et sollicitudin at, finibus non leo. Aenean sed pulvinar nulla, nec tincidunt felis. Aenean nibh elit, aliquam sit amet lobortis et, pellentesque ut orci. Curabitur placerat sem id ex laoreet imperdiet. Curabitur dictum ac urna feugiat viverra. Vivamus nec pulvinar urna. Suspendisse vel ultrices est. Sed malesuada est vel orci venenatis scelerisque. Phasellus ultrices dignissim sapien, at mattis tellus mattis pulvinar. Sed ut euismod velit, id fermentum leo." |
5698 | 5844 | }, |
5699 | 5845 | { |
5700 | | - "id": "8229841c-48c6-4157-bf37-8bf4ae4de0b5", |
| 5846 | + "id": "c4ca62a5-6903-477d-b682-243c1d06468b", |
5701 | 5847 | "key": "birthdate", |
5702 | 5848 | "value": "06/04/1998" |
5703 | 5849 | }, |
5704 | 5850 | { |
5705 | | - "id": "5350b8f9-b04c-4edd-b959-4f5f57ce3293", |
| 5851 | + "id": "4a5c518c-a41f-4611-9b5d-a734499e7910", |
5706 | 5852 | "key": "first_name2", |
5707 | 5853 | "value": "Félix" |
5708 | 5854 | }, |
5709 | 5855 | { |
5710 | | - "id": "62fb999e-1a9a-454b-8dc4-42ba8dc63992", |
| 5856 | + "id": "01771c29-6310-4230-87a8-b1d4068a761c", |
5711 | 5857 | "key": "last_name2", |
5712 | 5858 | "value": "Ensal" |
5713 | 5859 | }, |
5714 | 5860 | { |
5715 | | - "id": "4700fca7-c565-40c5-b44d-0a91d95d3244", |
| 5861 | + "id": "2bc7243c-b385-41be-bc4a-d628ff79ce95", |
5716 | 5862 | "key": "username2", |
5717 | 5863 | "value": "Ufree" |
5718 | 5864 | }, |
5719 | 5865 | { |
5720 | | - "id": "f45ef0d6-ab1e-4eec-b731-b9866f364d91", |
| 5866 | + "id": "a0aa03ee-3772-42ff-bfad-ec2f3d28e464", |
5721 | 5867 | "key": "bio2", |
5722 | 5868 | "value": "Donec quis porttitor ante, ac pulvinar nulla. Vivamus dignissim, ipsum ultricies interdum suscipit, risus tellus auctor mi, eu auctor metus sem quis urna. In maximus placerat ipsum, nec sodales elit aliquet sed. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Phasellus malesuada velit felis, non volutpat ex bibendum at. Maecenas aliquet sodales quam at consequat. Sed faucibus consequat tempor. Fusce consequat eu sem non tempus. Duis dapibus nunc vel tempus semper. Pellentesque dignissim tellus odio, vel luctus ipsum suscipit quis. Curabitur id erat at quam varius fermentum non in massa." |
5723 | 5869 | }, |
5724 | 5870 | { |
5725 | | - "id": "485192de-cf36-495b-8b4b-cdf109f703e5", |
| 5871 | + "id": "18884990-7b48-4be8-8e61-761c6d3dc979", |
5726 | 5872 | "key": "gender2", |
5727 | 5873 | "value": "other" |
5728 | 5874 | }, |
5729 | 5875 | { |
5730 | | - "id": "5f4b8f66-7484-44ee-9dae-aa5f79152477", |
| 5876 | + "id": "e2d30757-1f6c-4664-a9ea-83876b38a131", |
5731 | 5877 | "key": "orientation2", |
5732 | 5878 | "value": "bisexual" |
5733 | 5879 | }, |
5734 | 5880 | { |
5735 | | - "id": "a3795d99-b7db-423e-87cc-8d20e8f86133", |
| 5881 | + "id": "b85e8078-9744-44c7-b6bc-b937f87d750e", |
5736 | 5882 | "key": "birthdate2", |
5737 | 5883 | "value": "25/06/2000" |
5738 | 5884 | }, |
5739 | 5885 | { |
5740 | | - "id": "41cc7819-8011-40b7-ac3e-f1981a005541", |
| 5886 | + "id": "f1355ae7-e5e3-49f1-9ee2-e2ed92778afc", |
5741 | 5887 | "key": "email2", |
5742 | 5888 | "value": "felix.ensal@example.org" |
5743 | 5889 | }, |
5744 | 5890 | { |
5745 | | - "id": "a667eb2f-6de8-435f-acd0-fca418679644", |
| 5891 | + "id": "bf6cd6ff-8f1d-4cfb-9825-7030edcbac09", |
5746 | 5892 | "key": "password2", |
5747 | 5893 | "value": "dolphin2" |
5748 | 5894 | }, |
5749 | 5895 | { |
5750 | | - "id": "446446e5-9925-427d-9757-94946b9dbf11", |
| 5896 | + "id": "0dd3794a-5cd4-46d5-8603-dcc3158f5ce2", |
5751 | 5897 | "key": "ip", |
5752 | 5898 | "value": "90.108.46.63" |
5753 | 5899 | }, |
5754 | 5900 | { |
5755 | | - "id": "6b593d94-e816-46df-aa3f-fa4714121fc4", |
| 5901 | + "id": "26e53ac8-73fe-4e96-9294-55d30d04e61e", |
5756 | 5902 | "key": "lat", |
5757 | 5903 | "value": "49.5271" |
5758 | 5904 | }, |
5759 | 5905 | { |
5760 | | - "id": "1b548b39-45ba-4083-bf8d-63235565bc63", |
| 5906 | + "id": "560743fa-d3ec-4820-a7d9-8dac787f96f0", |
5761 | 5907 | "key": "lng", |
5762 | 5908 | "value": "1.1885" |
5763 | 5909 | } |
|
0 commit comments