|
3659 | 3659 | } |
3660 | 3660 | }, |
3661 | 3661 | "response": [] |
| 3662 | + }, |
| 3663 | + { |
| 3664 | + "name": "Edit geolocation with ip", |
| 3665 | + "event": [ |
| 3666 | + { |
| 3667 | + "listen": "test", |
| 3668 | + "script": { |
| 3669 | + "id": "39231db4-62ff-4230-8a9f-d6bcda2e91ad", |
| 3670 | + "exec": [ |
| 3671 | + "var response = JSON.parse(responseBody);", |
| 3672 | + "", |
| 3673 | + "", |
| 3674 | + "pm.test(\"Status code is 200\", function () {", |
| 3675 | + " pm.response.to.have.status(200);", |
| 3676 | + "});", |
| 3677 | + "", |
| 3678 | + "", |
| 3679 | + "tests[\"success is true\"] = response.success == true", |
| 3680 | + "tests[\"Message is correct\"] = response.message == \"New location sucessfully saved.\"" |
| 3681 | + ], |
| 3682 | + "type": "text/javascript" |
| 3683 | + } |
| 3684 | + } |
| 3685 | + ], |
| 3686 | + "request": { |
| 3687 | + "method": "PUT", |
| 3688 | + "header": [], |
| 3689 | + "body": { |
| 3690 | + "mode": "raw", |
| 3691 | + "raw": "{\n\t\"ip\": \"{{user_ip}}\"\n}", |
| 3692 | + "options": { |
| 3693 | + "raw": { |
| 3694 | + "language": "json" |
| 3695 | + } |
| 3696 | + } |
| 3697 | + }, |
| 3698 | + "url": { |
| 3699 | + "raw": "{{host}}/profile/edit/geolocation", |
| 3700 | + "host": [ |
| 3701 | + "{{host}}" |
| 3702 | + ], |
| 3703 | + "path": [ |
| 3704 | + "profile", |
| 3705 | + "edit", |
| 3706 | + "geolocation" |
| 3707 | + ] |
| 3708 | + } |
| 3709 | + }, |
| 3710 | + "response": [] |
| 3711 | + }, |
| 3712 | + { |
| 3713 | + "name": "Get one user after ip geoloc edit", |
| 3714 | + "event": [ |
| 3715 | + { |
| 3716 | + "listen": "test", |
| 3717 | + "script": { |
| 3718 | + "id": "499a0ac6-2355-490c-8f0f-010c397591be", |
| 3719 | + "exec": [ |
| 3720 | + "var response = JSON.parse(responseBody);", |
| 3721 | + "", |
| 3722 | + "", |
| 3723 | + "pm.test(\"Status code is 200\", function () {", |
| 3724 | + " pm.response.to.have.status(200);", |
| 3725 | + "});", |
| 3726 | + "", |
| 3727 | + "user_email = pm.collectionVariables.get(\"user_email\");", |
| 3728 | + "", |
| 3729 | + "tests[\"Is geohash correct\"] = response.geohash == \"ezzweqbd4wuk\"" |
| 3730 | + ], |
| 3731 | + "type": "text/javascript" |
| 3732 | + } |
| 3733 | + } |
| 3734 | + ], |
| 3735 | + "request": { |
| 3736 | + "method": "GET", |
| 3737 | + "header": [], |
| 3738 | + "url": { |
| 3739 | + "raw": "{{host}}/users/{{user_email}}", |
| 3740 | + "host": [ |
| 3741 | + "{{host}}" |
| 3742 | + ], |
| 3743 | + "path": [ |
| 3744 | + "users", |
| 3745 | + "{{user_email}}" |
| 3746 | + ] |
| 3747 | + } |
| 3748 | + }, |
| 3749 | + "response": [] |
| 3750 | + }, |
| 3751 | + { |
| 3752 | + "name": "Edit geolocation with lat lng", |
| 3753 | + "event": [ |
| 3754 | + { |
| 3755 | + "listen": "test", |
| 3756 | + "script": { |
| 3757 | + "id": "6f2ec5c9-96dc-4e1b-af46-96352d0d2135", |
| 3758 | + "exec": [ |
| 3759 | + "var response = JSON.parse(responseBody);", |
| 3760 | + "", |
| 3761 | + "", |
| 3762 | + "pm.test(\"Status code is 200\", function () {", |
| 3763 | + " pm.response.to.have.status(200);", |
| 3764 | + "});", |
| 3765 | + "", |
| 3766 | + "", |
| 3767 | + "tests[\"success is true\"] = response.success == true", |
| 3768 | + "tests[\"Message is correct\"] = response.message == \"New location sucessfully saved.\"" |
| 3769 | + ], |
| 3770 | + "type": "text/javascript" |
| 3771 | + } |
| 3772 | + } |
| 3773 | + ], |
| 3774 | + "request": { |
| 3775 | + "method": "PUT", |
| 3776 | + "header": [], |
| 3777 | + "body": { |
| 3778 | + "mode": "raw", |
| 3779 | + "raw": "{\n\t\"ip\": \"{{user_ip}}\",\n\t\"lat\": {{user_lat}},\n\t\"lng\": {{user_lng}}\n}", |
| 3780 | + "options": { |
| 3781 | + "raw": { |
| 3782 | + "language": "json" |
| 3783 | + } |
| 3784 | + } |
| 3785 | + }, |
| 3786 | + "url": { |
| 3787 | + "raw": "{{host}}/profile/edit/geolocation", |
| 3788 | + "host": [ |
| 3789 | + "{{host}}" |
| 3790 | + ], |
| 3791 | + "path": [ |
| 3792 | + "profile", |
| 3793 | + "edit", |
| 3794 | + "geolocation" |
| 3795 | + ] |
| 3796 | + } |
| 3797 | + }, |
| 3798 | + "response": [] |
| 3799 | + }, |
| 3800 | + { |
| 3801 | + "name": "Get one user after lat lng edit", |
| 3802 | + "event": [ |
| 3803 | + { |
| 3804 | + "listen": "test", |
| 3805 | + "script": { |
| 3806 | + "id": "14daee88-fcc1-4a60-8100-45eded9ecbd8", |
| 3807 | + "exec": [ |
| 3808 | + "var response = JSON.parse(responseBody);", |
| 3809 | + "", |
| 3810 | + "", |
| 3811 | + "pm.test(\"Status code is 200\", function () {", |
| 3812 | + " pm.response.to.have.status(200);", |
| 3813 | + "});", |
| 3814 | + "", |
| 3815 | + "user_email = pm.collectionVariables.get(\"user_email\");", |
| 3816 | + "", |
| 3817 | + "tests[\"Is geohash correct\"] = response.geohash == \"ezzx4fcq327u\"" |
| 3818 | + ], |
| 3819 | + "type": "text/javascript" |
| 3820 | + } |
| 3821 | + } |
| 3822 | + ], |
| 3823 | + "request": { |
| 3824 | + "method": "GET", |
| 3825 | + "header": [], |
| 3826 | + "url": { |
| 3827 | + "raw": "{{host}}/users/{{user_email}}", |
| 3828 | + "host": [ |
| 3829 | + "{{host}}" |
| 3830 | + ], |
| 3831 | + "path": [ |
| 3832 | + "users", |
| 3833 | + "{{user_email}}" |
| 3834 | + ] |
| 3835 | + } |
| 3836 | + }, |
| 3837 | + "response": [] |
3662 | 3838 | } |
3663 | 3839 | ], |
3664 | 3840 | "protocolProfileBehavior": {} |
|
0 commit comments