|
1314 | 1314 | { |
1315 | 1315 | "name": "Complete profile", |
1316 | 1316 | "item": [ |
| 1317 | + { |
| 1318 | + "name": "Complete profile bio too short", |
| 1319 | + "event": [ |
| 1320 | + { |
| 1321 | + "listen": "test", |
| 1322 | + "script": { |
| 1323 | + "id": "436c9d4d-2eaf-43ac-b31b-ec1fe6d7b9f2", |
| 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 == \"Bio is too short\"", |
| 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\": \"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 | + "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 | + }, |
| 1367 | + { |
| 1368 | + "name": "Complete profile not enough tags", |
| 1369 | + "event": [ |
| 1370 | + { |
| 1371 | + "listen": "test", |
| 1372 | + "script": { |
| 1373 | + "id": "0e03d610-46cd-4c45-8a10-42cc95f50b6f", |
| 1374 | + "exec": [ |
| 1375 | + "var response = JSON.parse(responseBody);", |
| 1376 | + "", |
| 1377 | + "", |
| 1378 | + "pm.test(\"Status code is 400\", function () {", |
| 1379 | + " pm.response.to.have.status(400);", |
| 1380 | + "});", |
| 1381 | + "", |
| 1382 | + "tests[\"JSON return code is 400\"] = response.code == 400", |
| 1383 | + "", |
| 1384 | + "tests[\"success is true\"] = response.success == false", |
| 1385 | + "tests[\"Message is correct\"] = response.error.message == \"At least 3 tags are required\"", |
| 1386 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"BadRequestError\"" |
| 1387 | + ], |
| 1388 | + "type": "text/javascript" |
| 1389 | + } |
| 1390 | + } |
| 1391 | + ], |
| 1392 | + "request": { |
| 1393 | + "method": "POST", |
| 1394 | + "header": [], |
| 1395 | + "body": { |
| 1396 | + "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}", |
| 1398 | + "options": { |
| 1399 | + "raw": { |
| 1400 | + "language": "json" |
| 1401 | + } |
| 1402 | + } |
| 1403 | + }, |
| 1404 | + "url": { |
| 1405 | + "raw": "{{host}}/profile/complete", |
| 1406 | + "host": [ |
| 1407 | + "{{host}}" |
| 1408 | + ], |
| 1409 | + "path": [ |
| 1410 | + "profile", |
| 1411 | + "complete" |
| 1412 | + ] |
| 1413 | + } |
| 1414 | + }, |
| 1415 | + "response": [] |
| 1416 | + }, |
1317 | 1417 | { |
1318 | 1418 | "name": "Complete profile duplicated tags", |
1319 | 1419 | "event": [ |
|
1364 | 1464 | }, |
1365 | 1465 | "response": [] |
1366 | 1466 | }, |
| 1467 | + { |
| 1468 | + "name": "Complete profile too young", |
| 1469 | + "event": [ |
| 1470 | + { |
| 1471 | + "listen": "test", |
| 1472 | + "script": { |
| 1473 | + "id": "5abbd6e3-70b6-4d12-a0e3-99f252a00794", |
| 1474 | + "exec": [ |
| 1475 | + "var response = JSON.parse(responseBody);", |
| 1476 | + "", |
| 1477 | + "", |
| 1478 | + "pm.test(\"Status code is 400\", function () {", |
| 1479 | + " pm.response.to.have.status(400);", |
| 1480 | + "});", |
| 1481 | + "", |
| 1482 | + "tests[\"JSON return code is 400\"] = response.code == 400", |
| 1483 | + "", |
| 1484 | + "tests[\"success is true\"] = response.success == false", |
| 1485 | + "tests[\"Message is correct\"] = response.error.message == \"You must be 18 years old or older\"", |
| 1486 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"BadRequestError\"" |
| 1487 | + ], |
| 1488 | + "type": "text/javascript" |
| 1489 | + } |
| 1490 | + } |
| 1491 | + ], |
| 1492 | + "request": { |
| 1493 | + "method": "POST", |
| 1494 | + "header": [], |
| 1495 | + "body": { |
| 1496 | + "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}", |
| 1498 | + "options": { |
| 1499 | + "raw": { |
| 1500 | + "language": "json" |
| 1501 | + } |
| 1502 | + } |
| 1503 | + }, |
| 1504 | + "url": { |
| 1505 | + "raw": "{{host}}/profile/complete", |
| 1506 | + "host": [ |
| 1507 | + "{{host}}" |
| 1508 | + ], |
| 1509 | + "path": [ |
| 1510 | + "profile", |
| 1511 | + "complete" |
| 1512 | + ] |
| 1513 | + } |
| 1514 | + }, |
| 1515 | + "response": [] |
| 1516 | + }, |
1367 | 1517 | { |
1368 | 1518 | "name": "Complete profile", |
1369 | 1519 | "event": [ |
@@ -3646,109 +3796,109 @@ |
3646 | 3796 | ], |
3647 | 3797 | "variable": [ |
3648 | 3798 | { |
3649 | | - "id": "befd8b3f-9044-4678-9d42-4a6c8338bf11", |
| 3799 | + "id": "3243df34-1e09-46d9-a5c9-14fa1d377ae7", |
3650 | 3800 | "key": "host", |
3651 | 3801 | "value": "http://127.0.0.1:5000", |
3652 | 3802 | "type": "string" |
3653 | 3803 | }, |
3654 | 3804 | { |
3655 | | - "id": "c4b1b28d-8534-47c2-82c7-860dc212642e", |
| 3805 | + "id": "d3fb7ee6-f649-40ba-a1a1-8a54222a905e", |
3656 | 3806 | "key": "user_id", |
3657 | 3807 | "value": "", |
3658 | 3808 | "type": "string" |
3659 | 3809 | }, |
3660 | 3810 | { |
3661 | | - "id": "4f7a5f1a-27ef-46df-b07a-5783a0582318", |
| 3811 | + "id": "be455f8c-7337-45b5-9fee-f3061099daff", |
3662 | 3812 | "key": "user_email", |
3663 | 3813 | "value": "foo@example.org", |
3664 | 3814 | "type": "string" |
3665 | 3815 | }, |
3666 | 3816 | { |
3667 | | - "id": "64c06a4c-82d7-4037-a181-a114c86cb8b1", |
| 3817 | + "id": "b5f9e01b-6131-482e-bf54-1590c9dbb641", |
3668 | 3818 | "key": "user_username", |
3669 | 3819 | "value": "foo", |
3670 | 3820 | "type": "string" |
3671 | 3821 | }, |
3672 | 3822 | { |
3673 | | - "id": "3434046b-300e-40f3-b9fd-73dd6bc2cd6c", |
| 3823 | + "id": "d5a1009c-95b7-42e2-be5d-cd44bf0d0ef0", |
3674 | 3824 | "key": "user_password", |
3675 | 3825 | "value": "admin", |
3676 | 3826 | "type": "string" |
3677 | 3827 | }, |
3678 | 3828 | { |
3679 | | - "id": "161c234f-f1f4-4ff5-bc40-657ebcb9f8c5", |
| 3829 | + "id": "d1a08ea9-b55b-4d6e-91e4-96cbc1226547", |
3680 | 3830 | "key": "user_firstname", |
3681 | 3831 | "value": "Foo", |
3682 | 3832 | "type": "string" |
3683 | 3833 | }, |
3684 | 3834 | { |
3685 | | - "id": "50525fc7-ea75-4c51-96a5-c5c86f23c0b0", |
| 3835 | + "id": "c16309d5-3eda-42e7-971e-5bc5f8e48d6e", |
3686 | 3836 | "key": "user_lastname", |
3687 | 3837 | "value": "Bar", |
3688 | 3838 | "type": "string" |
3689 | 3839 | }, |
3690 | 3840 | { |
3691 | | - "id": "44de7cd4-5407-4658-8520-6e46691bedc7", |
| 3841 | + "id": "28ef92a9-c27d-4c24-a416-99e28aa806ec", |
3692 | 3842 | "key": "debug_token", |
3693 | 3843 | "value": "xX69jules69Xx", |
3694 | 3844 | "type": "string" |
3695 | 3845 | }, |
3696 | 3846 | { |
3697 | | - "id": "5f242c9a-b6c8-4629-97d6-43892032c5d1", |
| 3847 | + "id": "ccf1a59e-3223-40e4-a185-65a21abea20c", |
3698 | 3848 | "key": "user_access_token", |
3699 | 3849 | "value": "", |
3700 | 3850 | "type": "string" |
3701 | 3851 | }, |
3702 | 3852 | { |
3703 | | - "id": "d7266cf0-0862-409b-b5fc-c628b34d0d48", |
| 3853 | + "id": "3d4b8b6d-a8d7-44fc-b5b3-425ac33d3b27", |
3704 | 3854 | "key": "user_refresh_token", |
3705 | 3855 | "value": "", |
3706 | 3856 | "type": "string" |
3707 | 3857 | }, |
3708 | 3858 | { |
3709 | | - "id": "ea412b72-2502-4e1c-a337-4303217e9567", |
| 3859 | + "id": "1bc11bd8-fe77-4801-8c81-90794c1b95d2", |
3710 | 3860 | "key": "expired_token", |
3711 | 3861 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU", |
3712 | 3862 | "type": "string" |
3713 | 3863 | }, |
3714 | 3864 | { |
3715 | | - "id": "15a1e7fa-a337-4a29-8b7f-9678e76ac359", |
| 3865 | + "id": "e7c96071-c62d-41bd-99a3-143ee886048e", |
3716 | 3866 | "key": "user_orientation", |
3717 | 3867 | "value": "heterosexual", |
3718 | 3868 | "type": "string" |
3719 | 3869 | }, |
3720 | 3870 | { |
3721 | | - "id": "3637321b-78a5-4fdb-b778-0a2be4c1a4c0", |
| 3871 | + "id": "8c04f548-8d00-42d5-8524-925da29c837c", |
3722 | 3872 | "key": "user_bio", |
3723 | 3873 | "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.", |
3724 | 3874 | "type": "string" |
3725 | 3875 | }, |
3726 | 3876 | { |
3727 | | - "id": "c6b3be30-6f52-484e-bb25-7287064a18d2", |
| 3877 | + "id": "ac4953fd-ab5e-4d3c-94c9-9241d176709d", |
3728 | 3878 | "key": "user_gender", |
3729 | 3879 | "value": "male", |
3730 | 3880 | "type": "string" |
3731 | 3881 | }, |
3732 | 3882 | { |
3733 | | - "id": "1b2c293e-b2e3-47fb-8843-37dfc40527ef", |
| 3883 | + "id": "6cde30ee-9f1d-48a5-9f64-85831089f86e", |
3734 | 3884 | "key": "user_birthdate", |
3735 | | - "value": "1590674628", |
| 3885 | + "value": "891871428", |
3736 | 3886 | "type": "string" |
3737 | 3887 | }, |
3738 | 3888 | { |
3739 | | - "id": "cfc85af0-71b7-4e21-aec9-e6ed932baa07", |
| 3889 | + "id": "6da6191a-5954-4e89-9a50-6e4772e34276", |
3740 | 3890 | "key": "user_lat", |
3741 | 3891 | "value": "44.8404", |
3742 | 3892 | "type": "string" |
3743 | 3893 | }, |
3744 | 3894 | { |
3745 | | - "id": "bea4970c-1b1b-495e-aacd-5f28919da8be", |
| 3895 | + "id": "b6764588-2618-433c-b462-9907784b47a0", |
3746 | 3896 | "key": "user_lng", |
3747 | 3897 | "value": "-0.5805", |
3748 | 3898 | "type": "string" |
3749 | 3899 | }, |
3750 | 3900 | { |
3751 | | - "id": "56bc40c9-b5d0-47bb-bf4c-030cd02f35fb", |
| 3901 | + "id": "1db8f131-cc74-4e34-8611-7b0379838411", |
3752 | 3902 | "key": "user_ip", |
3753 | 3903 | "value": "77.205.46.181", |
3754 | 3904 | "type": "string" |
|
0 commit comments