|
1884 | 1884 | } |
1885 | 1885 | }, |
1886 | 1886 | "response": [] |
| 1887 | + }, |
| 1888 | + { |
| 1889 | + "name": "Edit geolocation with ip", |
| 1890 | + "event": [ |
| 1891 | + { |
| 1892 | + "listen": "test", |
| 1893 | + "script": { |
| 1894 | + "id": "39231db4-62ff-4230-8a9f-d6bcda2e91ad", |
| 1895 | + "exec": [ |
| 1896 | + "var response = JSON.parse(responseBody);", |
| 1897 | + "", |
| 1898 | + "", |
| 1899 | + "pm.test(\"Status code is 200\", function () {", |
| 1900 | + " pm.response.to.have.status(200);", |
| 1901 | + "});", |
| 1902 | + "", |
| 1903 | + "", |
| 1904 | + "tests[\"success is true\"] = response.success == true", |
| 1905 | + "tests[\"Message is correct\"] = response.message == \"New location sucessfully saved.\"" |
| 1906 | + ], |
| 1907 | + "type": "text/javascript" |
| 1908 | + } |
| 1909 | + } |
| 1910 | + ], |
| 1911 | + "request": { |
| 1912 | + "method": "PUT", |
| 1913 | + "header": [], |
| 1914 | + "body": { |
| 1915 | + "mode": "raw", |
| 1916 | + "raw": "{\n\t\"ip\": \"{{user_ip}}\"\n}", |
| 1917 | + "options": { |
| 1918 | + "raw": { |
| 1919 | + "language": "json" |
| 1920 | + } |
| 1921 | + } |
| 1922 | + }, |
| 1923 | + "url": { |
| 1924 | + "raw": "{{host}}/profile/edit/geolocation", |
| 1925 | + "host": [ |
| 1926 | + "{{host}}" |
| 1927 | + ], |
| 1928 | + "path": [ |
| 1929 | + "profile", |
| 1930 | + "edit", |
| 1931 | + "geolocation" |
| 1932 | + ] |
| 1933 | + } |
| 1934 | + }, |
| 1935 | + "response": [] |
| 1936 | + }, |
| 1937 | + { |
| 1938 | + "name": "Get one user after ip geoloc edit", |
| 1939 | + "event": [ |
| 1940 | + { |
| 1941 | + "listen": "test", |
| 1942 | + "script": { |
| 1943 | + "id": "499a0ac6-2355-490c-8f0f-010c397591be", |
| 1944 | + "exec": [ |
| 1945 | + "var response = JSON.parse(responseBody);", |
| 1946 | + "", |
| 1947 | + "", |
| 1948 | + "pm.test(\"Status code is 200\", function () {", |
| 1949 | + " pm.response.to.have.status(200);", |
| 1950 | + "});", |
| 1951 | + "", |
| 1952 | + "user_email = pm.collectionVariables.get(\"user_email\");", |
| 1953 | + "", |
| 1954 | + "tests[\"Is geohash correct\"] = response.geohash == \"ezzweqbd4wuk\"" |
| 1955 | + ], |
| 1956 | + "type": "text/javascript" |
| 1957 | + } |
| 1958 | + } |
| 1959 | + ], |
| 1960 | + "request": { |
| 1961 | + "method": "GET", |
| 1962 | + "header": [], |
| 1963 | + "url": { |
| 1964 | + "raw": "{{host}}/users/{{user_email}}", |
| 1965 | + "host": [ |
| 1966 | + "{{host}}" |
| 1967 | + ], |
| 1968 | + "path": [ |
| 1969 | + "users", |
| 1970 | + "{{user_email}}" |
| 1971 | + ] |
| 1972 | + } |
| 1973 | + }, |
| 1974 | + "response": [] |
| 1975 | + }, |
| 1976 | + { |
| 1977 | + "name": "Edit geolocation with lat lng", |
| 1978 | + "event": [ |
| 1979 | + { |
| 1980 | + "listen": "test", |
| 1981 | + "script": { |
| 1982 | + "id": "6f2ec5c9-96dc-4e1b-af46-96352d0d2135", |
| 1983 | + "exec": [ |
| 1984 | + "var response = JSON.parse(responseBody);", |
| 1985 | + "", |
| 1986 | + "", |
| 1987 | + "pm.test(\"Status code is 200\", function () {", |
| 1988 | + " pm.response.to.have.status(200);", |
| 1989 | + "});", |
| 1990 | + "", |
| 1991 | + "", |
| 1992 | + "tests[\"success is true\"] = response.success == true", |
| 1993 | + "tests[\"Message is correct\"] = response.message == \"New location sucessfully saved.\"" |
| 1994 | + ], |
| 1995 | + "type": "text/javascript" |
| 1996 | + } |
| 1997 | + } |
| 1998 | + ], |
| 1999 | + "request": { |
| 2000 | + "method": "PUT", |
| 2001 | + "header": [], |
| 2002 | + "body": { |
| 2003 | + "mode": "raw", |
| 2004 | + "raw": "{\n\t\"ip\": \"{{user_ip}}\",\n\t\"lat\": {{user_lat}},\n\t\"lng\": {{user_lng}}\n}", |
| 2005 | + "options": { |
| 2006 | + "raw": { |
| 2007 | + "language": "json" |
| 2008 | + } |
| 2009 | + } |
| 2010 | + }, |
| 2011 | + "url": { |
| 2012 | + "raw": "{{host}}/profile/edit/geolocation", |
| 2013 | + "host": [ |
| 2014 | + "{{host}}" |
| 2015 | + ], |
| 2016 | + "path": [ |
| 2017 | + "profile", |
| 2018 | + "edit", |
| 2019 | + "geolocation" |
| 2020 | + ] |
| 2021 | + } |
| 2022 | + }, |
| 2023 | + "response": [] |
| 2024 | + }, |
| 2025 | + { |
| 2026 | + "name": "Get one user after lat lng edit", |
| 2027 | + "event": [ |
| 2028 | + { |
| 2029 | + "listen": "test", |
| 2030 | + "script": { |
| 2031 | + "id": "14daee88-fcc1-4a60-8100-45eded9ecbd8", |
| 2032 | + "exec": [ |
| 2033 | + "var response = JSON.parse(responseBody);", |
| 2034 | + "", |
| 2035 | + "", |
| 2036 | + "pm.test(\"Status code is 200\", function () {", |
| 2037 | + " pm.response.to.have.status(200);", |
| 2038 | + "});", |
| 2039 | + "", |
| 2040 | + "user_email = pm.collectionVariables.get(\"user_email\");", |
| 2041 | + "", |
| 2042 | + "tests[\"Is geohash correct\"] = response.geohash == \"ezzx4fcq327u\"" |
| 2043 | + ], |
| 2044 | + "type": "text/javascript" |
| 2045 | + } |
| 2046 | + } |
| 2047 | + ], |
| 2048 | + "request": { |
| 2049 | + "method": "GET", |
| 2050 | + "header": [], |
| 2051 | + "url": { |
| 2052 | + "raw": "{{host}}/users/{{user_email}}", |
| 2053 | + "host": [ |
| 2054 | + "{{host}}" |
| 2055 | + ], |
| 2056 | + "path": [ |
| 2057 | + "users", |
| 2058 | + "{{user_email}}" |
| 2059 | + ] |
| 2060 | + } |
| 2061 | + }, |
| 2062 | + "response": [] |
1887 | 2063 | } |
1888 | 2064 | ], |
1889 | 2065 | "protocolProfileBehavior": {} |
|
1992 | 2168 | ], |
1993 | 2169 | "variable": [ |
1994 | 2170 | { |
1995 | | - "id": "0b227a65-f661-47b2-8bc4-cbaadf557d17", |
| 2171 | + "id": "ba54d237-6790-4b6a-9516-a39706728255", |
1996 | 2172 | "key": "host", |
1997 | 2173 | "value": "http://127.0.0.1:5000", |
1998 | 2174 | "type": "string" |
1999 | 2175 | }, |
2000 | 2176 | { |
2001 | | - "id": "cda2689f-841d-40cf-83f7-126c84c175e5", |
| 2177 | + "id": "83404c17-bd3c-4c78-bcbe-04fc63afcd2c", |
2002 | 2178 | "key": "user_id", |
2003 | 2179 | "value": "", |
2004 | 2180 | "type": "string" |
2005 | 2181 | }, |
2006 | 2182 | { |
2007 | | - "id": "901e9e11-29dd-4cff-9f8f-5ef222000d7d", |
| 2183 | + "id": "8f89a062-8871-4338-bf87-315bc90865ac", |
2008 | 2184 | "key": "user_email", |
2009 | 2185 | "value": "foo@example.org", |
2010 | 2186 | "type": "string" |
2011 | 2187 | }, |
2012 | 2188 | { |
2013 | | - "id": "873da2ea-7d43-4e13-a409-2a42f5b3fada", |
| 2189 | + "id": "7fe38071-c287-4ef7-b7bc-fade4e70ce41", |
2014 | 2190 | "key": "user_username", |
2015 | 2191 | "value": "foo", |
2016 | 2192 | "type": "string" |
2017 | 2193 | }, |
2018 | 2194 | { |
2019 | | - "id": "11c9af91-cfc0-4bac-a197-6f3efa0edf42", |
| 2195 | + "id": "089c8889-0774-458b-9ff6-1768db6d496d", |
2020 | 2196 | "key": "user_password", |
2021 | 2197 | "value": "admin", |
2022 | 2198 | "type": "string" |
2023 | 2199 | }, |
2024 | 2200 | { |
2025 | | - "id": "4bb1d9e2-3eee-49b0-9591-8a87e4b28a05", |
| 2201 | + "id": "6049c136-632d-4096-85cf-e07936df0b98", |
2026 | 2202 | "key": "user_firstname", |
2027 | 2203 | "value": "Foo", |
2028 | 2204 | "type": "string" |
2029 | 2205 | }, |
2030 | 2206 | { |
2031 | | - "id": "69f58f99-73b4-4fc6-bfe6-46ff80240ce2", |
| 2207 | + "id": "2b124a77-82ee-471b-b0da-d67f33b51968", |
2032 | 2208 | "key": "user_lastname", |
2033 | 2209 | "value": "Bar", |
2034 | 2210 | "type": "string" |
2035 | 2211 | }, |
2036 | 2212 | { |
2037 | | - "id": "e305f6b4-a16d-48e0-b3df-da36fffd800b", |
| 2213 | + "id": "a747331a-a123-4ec5-815a-9a782bb221c2", |
2038 | 2214 | "key": "debug_token", |
2039 | 2215 | "value": "xX69jules69Xx", |
2040 | 2216 | "type": "string" |
2041 | 2217 | }, |
2042 | 2218 | { |
2043 | | - "id": "89274e60-1321-42ab-9158-6518061bbb5d", |
| 2219 | + "id": "310d251f-935b-4bfa-9009-bfa2c9253fde", |
2044 | 2220 | "key": "user_access_token", |
2045 | 2221 | "value": "", |
2046 | 2222 | "type": "string" |
2047 | 2223 | }, |
2048 | 2224 | { |
2049 | | - "id": "998a540c-261c-4202-84ea-fb7734042831", |
| 2225 | + "id": "dda8194b-da83-463a-8777-fdf09bd57397", |
2050 | 2226 | "key": "user_refresh_token", |
2051 | 2227 | "value": "", |
2052 | 2228 | "type": "string" |
2053 | 2229 | }, |
2054 | 2230 | { |
2055 | | - "id": "3553c278-be1c-4547-80a8-5f2c221a40f9", |
| 2231 | + "id": "53a51049-0f79-44ed-94d2-776bff535df0", |
2056 | 2232 | "key": "expired_token", |
2057 | 2233 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU", |
2058 | 2234 | "type": "string" |
2059 | 2235 | }, |
2060 | 2236 | { |
2061 | | - "id": "b4792aa7-be9a-45e7-9420-4ddae8a688b7", |
| 2237 | + "id": "6b0d9aef-9b57-4dd3-81d7-57f0eac7e050", |
2062 | 2238 | "key": "user_orientation", |
2063 | 2239 | "value": "heterosexual", |
2064 | 2240 | "type": "string" |
2065 | 2241 | }, |
2066 | 2242 | { |
2067 | | - "id": "b4f62225-257f-40dc-b89a-517c054381bd", |
| 2243 | + "id": "5c9181e4-9016-4e21-96ea-5dc4068e7f2a", |
2068 | 2244 | "key": "user_bio", |
2069 | 2245 | "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.", |
2070 | 2246 | "type": "string" |
2071 | 2247 | }, |
2072 | 2248 | { |
2073 | | - "id": "f4264583-0652-4208-9490-f130eec59dfb", |
| 2249 | + "id": "a509cf68-fed7-498e-b193-ec4917ab5b64", |
2074 | 2250 | "key": "user_gender", |
2075 | 2251 | "value": "male", |
2076 | 2252 | "type": "string" |
2077 | 2253 | }, |
2078 | 2254 | { |
2079 | | - "id": "6c69f0b0-9c4a-4566-b37f-27c4f445dc6c", |
| 2255 | + "id": "94c52bbf-019b-48ec-a981-fe71decd979f", |
2080 | 2256 | "key": "user_birthdate", |
2081 | 2257 | "value": "1590674628", |
2082 | 2258 | "type": "string" |
| 2259 | + }, |
| 2260 | + { |
| 2261 | + "id": "aa7335f6-3aa9-4993-bd22-6d2faeb0ef54", |
| 2262 | + "key": "user_lat", |
| 2263 | + "value": "44.8404", |
| 2264 | + "type": "string" |
| 2265 | + }, |
| 2266 | + { |
| 2267 | + "id": "5037aa20-cc43-483a-8d0f-5f289e3ed3a0", |
| 2268 | + "key": "user_lng", |
| 2269 | + "value": "-0.5805", |
| 2270 | + "type": "string" |
| 2271 | + }, |
| 2272 | + { |
| 2273 | + "id": "21c4e9a3-fc74-4c92-9f6c-f5eb071db1c1", |
| 2274 | + "key": "user_ip", |
| 2275 | + "value": "77.205.46.181", |
| 2276 | + "type": "string" |
2083 | 2277 | } |
2084 | 2278 | ], |
2085 | 2279 | "protocolProfileBehavior": {} |
|
0 commit comments