|
1314 | 1314 | { |
1315 | 1315 | "name": "Complete profile", |
1316 | 1316 | "item": [ |
| 1317 | + { |
| 1318 | + "name": "Complete profile wrong birthdatre format", |
| 1319 | + "event": [ |
| 1320 | + { |
| 1321 | + "listen": "test", |
| 1322 | + "script": { |
| 1323 | + "id": "19ef2fae-c501-48d2-ab5c-c3fd1bad5603", |
| 1324 | + "exec": [ |
| 1325 | + "var response = JSON.parse(responseBody);", |
| 1326 | + "", |
| 1327 | + "", |
| 1328 | + "pm.test(\"Status code is 400\", function () {", |
| 1329 | + " pm.response.to.have.status(400);", |
| 1330 | + "});", |
| 1331 | + "", |
| 1332 | + "tests[\"JSON return code is 400\"] = response.code == 400", |
| 1333 | + "", |
| 1334 | + "tests[\"success is true\"] = response.success == false", |
| 1335 | + "tests[\"Message is correct\"] = response.error.message == \"Birthdate format must be %d/%m/%Y (day/month/year)\"", |
| 1336 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"BadRequestError\"" |
| 1337 | + ], |
| 1338 | + "type": "text/javascript" |
| 1339 | + } |
| 1340 | + } |
| 1341 | + ], |
| 1342 | + "request": { |
| 1343 | + "method": "POST", |
| 1344 | + "header": [], |
| 1345 | + "body": { |
| 1346 | + "mode": "raw", |
| 1347 | + "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": \"06 04 1998\"\n}", |
| 1348 | + "options": { |
| 1349 | + "raw": { |
| 1350 | + "language": "json" |
| 1351 | + } |
| 1352 | + } |
| 1353 | + }, |
| 1354 | + "url": { |
| 1355 | + "raw": "{{host}}/profile/complete", |
| 1356 | + "host": [ |
| 1357 | + "{{host}}" |
| 1358 | + ], |
| 1359 | + "path": [ |
| 1360 | + "profile", |
| 1361 | + "complete" |
| 1362 | + ] |
| 1363 | + } |
| 1364 | + }, |
| 1365 | + "response": [] |
| 1366 | + }, |
1317 | 1367 | { |
1318 | 1368 | "name": "Complete profile bio too short", |
1319 | 1369 | "event": [ |
|
1344 | 1394 | "header": [], |
1345 | 1395 | "body": { |
1346 | 1396 | "mode": "raw", |
1347 | | - "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"Bonjour\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": {{user_birthdate}}\n}", |
| 1397 | + "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"Bonjour\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": \"{{user_birthdate}}\"\n}", |
1348 | 1398 | "options": { |
1349 | 1399 | "raw": { |
1350 | 1400 | "language": "json" |
|
1394 | 1444 | "header": [], |
1395 | 1445 | "body": { |
1396 | 1446 | "mode": "raw", |
1397 | | - "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": {{user_birthdate}}\n}", |
| 1447 | + "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": \"{{user_birthdate}}\"\n}", |
1398 | 1448 | "options": { |
1399 | 1449 | "raw": { |
1400 | 1450 | "language": "json" |
|
1444 | 1494 | "header": [], |
1445 | 1495 | "body": { |
1446 | 1496 | "mode": "raw", |
1447 | | - "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": {{user_birthdate}}\n}", |
| 1497 | + "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": \"{{user_birthdate}}\"\n}", |
1448 | 1498 | "options": { |
1449 | 1499 | "raw": { |
1450 | 1500 | "language": "json" |
|
1494 | 1544 | "header": [], |
1495 | 1545 | "body": { |
1496 | 1546 | "mode": "raw", |
1497 | | - "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": 1591307841\n}", |
| 1547 | + "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": \"06/04/2020\"\n}", |
1498 | 1548 | "options": { |
1499 | 1549 | "raw": { |
1500 | 1550 | "language": "json" |
|
1543 | 1593 | "header": [], |
1544 | 1594 | "body": { |
1545 | 1595 | "mode": "raw", |
1546 | | - "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": {{user_birthdate}}\n}", |
| 1596 | + "raw": "{\n\t\"orientation\": \"{{user_orientation}}\",\n\t\"bio\": \"{{user_bio}}\",\n\t\"tags\": [\n\t\t\"bot\",\n\t\t\"robot\",\n\t\t\"postman\",\n\t\t\"sex\",\n\t\t\"friends\",\n\t\t\"drink\",\n\t\t\"smoke\"\n\t\t],\n\t\"gender\": \"{{user_gender}}\",\n\t\"birthdate\": \"{{user_birthdate}}\"\n}", |
1547 | 1597 | "options": { |
1548 | 1598 | "raw": { |
1549 | 1599 | "language": "json" |
@@ -3796,109 +3846,109 @@ |
3796 | 3846 | ], |
3797 | 3847 | "variable": [ |
3798 | 3848 | { |
3799 | | - "id": "3243df34-1e09-46d9-a5c9-14fa1d377ae7", |
| 3849 | + "id": "6099b8b2-2e73-44f4-9f74-78e9089dfdff", |
3800 | 3850 | "key": "host", |
3801 | 3851 | "value": "http://127.0.0.1:5000", |
3802 | 3852 | "type": "string" |
3803 | 3853 | }, |
3804 | 3854 | { |
3805 | | - "id": "d3fb7ee6-f649-40ba-a1a1-8a54222a905e", |
| 3855 | + "id": "714206c8-2107-4eff-8ae8-ebf5e2015f94", |
3806 | 3856 | "key": "user_id", |
3807 | 3857 | "value": "", |
3808 | 3858 | "type": "string" |
3809 | 3859 | }, |
3810 | 3860 | { |
3811 | | - "id": "be455f8c-7337-45b5-9fee-f3061099daff", |
| 3861 | + "id": "4e75b103-8383-47ee-bef0-4425f7ff99c5", |
3812 | 3862 | "key": "user_email", |
3813 | 3863 | "value": "foo@example.org", |
3814 | 3864 | "type": "string" |
3815 | 3865 | }, |
3816 | 3866 | { |
3817 | | - "id": "b5f9e01b-6131-482e-bf54-1590c9dbb641", |
| 3867 | + "id": "665e0304-daa9-4c01-b859-780889d2ff5f", |
3818 | 3868 | "key": "user_username", |
3819 | 3869 | "value": "foo", |
3820 | 3870 | "type": "string" |
3821 | 3871 | }, |
3822 | 3872 | { |
3823 | | - "id": "d5a1009c-95b7-42e2-be5d-cd44bf0d0ef0", |
| 3873 | + "id": "cf9665a1-0e7e-430d-8011-a3b352043b6e", |
3824 | 3874 | "key": "user_password", |
3825 | 3875 | "value": "admin", |
3826 | 3876 | "type": "string" |
3827 | 3877 | }, |
3828 | 3878 | { |
3829 | | - "id": "d1a08ea9-b55b-4d6e-91e4-96cbc1226547", |
| 3879 | + "id": "93c59f99-458f-4e39-a7e7-87a6e1f6f377", |
3830 | 3880 | "key": "user_firstname", |
3831 | 3881 | "value": "Foo", |
3832 | 3882 | "type": "string" |
3833 | 3883 | }, |
3834 | 3884 | { |
3835 | | - "id": "c16309d5-3eda-42e7-971e-5bc5f8e48d6e", |
| 3885 | + "id": "f2ae4172-b5ec-4640-b4af-f8be4853ec49", |
3836 | 3886 | "key": "user_lastname", |
3837 | 3887 | "value": "Bar", |
3838 | 3888 | "type": "string" |
3839 | 3889 | }, |
3840 | 3890 | { |
3841 | | - "id": "28ef92a9-c27d-4c24-a416-99e28aa806ec", |
| 3891 | + "id": "d936adc6-51e9-48ca-b5d7-8a3a54a73650", |
3842 | 3892 | "key": "debug_token", |
3843 | 3893 | "value": "xX69jules69Xx", |
3844 | 3894 | "type": "string" |
3845 | 3895 | }, |
3846 | 3896 | { |
3847 | | - "id": "ccf1a59e-3223-40e4-a185-65a21abea20c", |
| 3897 | + "id": "186a863a-cc6e-4187-b636-ff1b7df31d14", |
3848 | 3898 | "key": "user_access_token", |
3849 | 3899 | "value": "", |
3850 | 3900 | "type": "string" |
3851 | 3901 | }, |
3852 | 3902 | { |
3853 | | - "id": "3d4b8b6d-a8d7-44fc-b5b3-425ac33d3b27", |
| 3903 | + "id": "f3e535fc-76c9-49eb-92c1-a4c5ff3c5307", |
3854 | 3904 | "key": "user_refresh_token", |
3855 | 3905 | "value": "", |
3856 | 3906 | "type": "string" |
3857 | 3907 | }, |
3858 | 3908 | { |
3859 | | - "id": "1bc11bd8-fe77-4801-8c81-90794c1b95d2", |
| 3909 | + "id": "70529b93-f36f-4a24-88de-b1842f0b61e9", |
3860 | 3910 | "key": "expired_token", |
3861 | 3911 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU", |
3862 | 3912 | "type": "string" |
3863 | 3913 | }, |
3864 | 3914 | { |
3865 | | - "id": "e7c96071-c62d-41bd-99a3-143ee886048e", |
| 3915 | + "id": "9c08e3a8-2605-45cd-b367-da94e7b1befc", |
3866 | 3916 | "key": "user_orientation", |
3867 | 3917 | "value": "heterosexual", |
3868 | 3918 | "type": "string" |
3869 | 3919 | }, |
3870 | 3920 | { |
3871 | | - "id": "8c04f548-8d00-42d5-8524-925da29c837c", |
| 3921 | + "id": "e495090b-8ca2-4fe3-97fc-2e6ac3ab1a7b", |
3872 | 3922 | "key": "user_bio", |
3873 | 3923 | "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.", |
3874 | 3924 | "type": "string" |
3875 | 3925 | }, |
3876 | 3926 | { |
3877 | | - "id": "ac4953fd-ab5e-4d3c-94c9-9241d176709d", |
| 3927 | + "id": "6e78fb84-ee65-416d-96bf-82141d494e19", |
3878 | 3928 | "key": "user_gender", |
3879 | 3929 | "value": "male", |
3880 | 3930 | "type": "string" |
3881 | 3931 | }, |
3882 | 3932 | { |
3883 | | - "id": "6cde30ee-9f1d-48a5-9f64-85831089f86e", |
| 3933 | + "id": "ae88bd6a-68ef-43ec-9cfa-04aba929cfcc", |
3884 | 3934 | "key": "user_birthdate", |
3885 | | - "value": "891871428", |
| 3935 | + "value": "06/04/1998", |
3886 | 3936 | "type": "string" |
3887 | 3937 | }, |
3888 | 3938 | { |
3889 | | - "id": "6da6191a-5954-4e89-9a50-6e4772e34276", |
| 3939 | + "id": "083094e4-16bf-4eb9-bf9e-ecb37ebf747f", |
3890 | 3940 | "key": "user_lat", |
3891 | 3941 | "value": "44.8404", |
3892 | 3942 | "type": "string" |
3893 | 3943 | }, |
3894 | 3944 | { |
3895 | | - "id": "b6764588-2618-433c-b462-9907784b47a0", |
| 3945 | + "id": "ae94618b-31bb-4c07-9c87-f7d81bc32eef", |
3896 | 3946 | "key": "user_lng", |
3897 | 3947 | "value": "-0.5805", |
3898 | 3948 | "type": "string" |
3899 | 3949 | }, |
3900 | 3950 | { |
3901 | | - "id": "1db8f131-cc74-4e34-8611-7b0379838411", |
| 3951 | + "id": "89b0ed54-50e0-4924-b6cc-ac61756173ec", |
3902 | 3952 | "key": "user_ip", |
3903 | 3953 | "value": "77.205.46.181", |
3904 | 3954 | "type": "string" |
|
0 commit comments