|
1949 | 1949 | " pm.response.to.have.status(200);", |
1950 | 1950 | "});", |
1951 | 1951 | "", |
1952 | | - "user_email = pm.collectionVariables.get(\"user_email\");", |
1953 | | - "", |
1954 | 1952 | "tests[\"Is geohash correct\"] = response.geohash == \"ezzweqbd4wuk\"" |
1955 | 1953 | ], |
1956 | 1954 | "type": "text/javascript" |
|
2037 | 2035 | " pm.response.to.have.status(200);", |
2038 | 2036 | "});", |
2039 | 2037 | "", |
2040 | | - "user_email = pm.collectionVariables.get(\"user_email\");", |
2041 | | - "", |
2042 | 2038 | "tests[\"Is geohash correct\"] = response.geohash == \"ezzx4fcq327u\"" |
2043 | 2039 | ], |
2044 | 2040 | "type": "text/javascript" |
|
2060 | 2056 | } |
2061 | 2057 | }, |
2062 | 2058 | "response": [] |
| 2059 | + }, |
| 2060 | + { |
| 2061 | + "name": "Create random views", |
| 2062 | + "event": [ |
| 2063 | + { |
| 2064 | + "listen": "prerequest", |
| 2065 | + "script": { |
| 2066 | + "id": "545bcc8e-5159-4ce2-9a28-11efc5dfbf62", |
| 2067 | + "exec": [ |
| 2068 | + "" |
| 2069 | + ], |
| 2070 | + "type": "text/javascript" |
| 2071 | + } |
| 2072 | + }, |
| 2073 | + { |
| 2074 | + "listen": "test", |
| 2075 | + "script": { |
| 2076 | + "id": "90d417c9-84fa-457d-adbb-93c453b15a29", |
| 2077 | + "exec": [ |
| 2078 | + "var response = JSON.parse(responseBody);", |
| 2079 | + "", |
| 2080 | + "", |
| 2081 | + "pm.test(\"Status code is 200\", function () {", |
| 2082 | + " pm.response.to.have.status(200);", |
| 2083 | + "});", |
| 2084 | + "", |
| 2085 | + "tests[\"JSON return code is 200\"] = response.code == 200", |
| 2086 | + "", |
| 2087 | + "tests[\"success is true\"] = response.success == true" |
| 2088 | + ], |
| 2089 | + "type": "text/javascript" |
| 2090 | + } |
| 2091 | + } |
| 2092 | + ], |
| 2093 | + "request": { |
| 2094 | + "method": "POST", |
| 2095 | + "header": [ |
| 2096 | + { |
| 2097 | + "key": "debug-auth-token", |
| 2098 | + "value": "xX69jules69Xx", |
| 2099 | + "type": "text" |
| 2100 | + } |
| 2101 | + ], |
| 2102 | + "url": { |
| 2103 | + "raw": "{{host}}/debug/views/78", |
| 2104 | + "host": [ |
| 2105 | + "{{host}}" |
| 2106 | + ], |
| 2107 | + "path": [ |
| 2108 | + "debug", |
| 2109 | + "views", |
| 2110 | + "78" |
| 2111 | + ] |
| 2112 | + } |
| 2113 | + }, |
| 2114 | + "response": [] |
| 2115 | + }, |
| 2116 | + { |
| 2117 | + "name": "Get profile views", |
| 2118 | + "event": [ |
| 2119 | + { |
| 2120 | + "listen": "test", |
| 2121 | + "script": { |
| 2122 | + "id": "dade5edf-80bc-4e3c-8509-d56281228062", |
| 2123 | + "exec": [ |
| 2124 | + "var response = JSON.parse(responseBody);", |
| 2125 | + "", |
| 2126 | + "", |
| 2127 | + "pm.test(\"Status code is 200\", function () {", |
| 2128 | + " pm.response.to.have.status(200);", |
| 2129 | + "});", |
| 2130 | + "", |
| 2131 | + "tests[\"JSON return code is 200\"] = response.code == 200", |
| 2132 | + "", |
| 2133 | + "tests[\"success is true\"] = response.success == true", |
| 2134 | + "", |
| 2135 | + "tests[\"View count\"] = response.views.length == 78" |
| 2136 | + ], |
| 2137 | + "type": "text/javascript" |
| 2138 | + } |
| 2139 | + } |
| 2140 | + ], |
| 2141 | + "request": { |
| 2142 | + "method": "GET", |
| 2143 | + "header": [], |
| 2144 | + "url": { |
| 2145 | + "raw": "{{host}}/profile/views", |
| 2146 | + "host": [ |
| 2147 | + "{{host}}" |
| 2148 | + ], |
| 2149 | + "path": [ |
| 2150 | + "profile", |
| 2151 | + "views" |
| 2152 | + ] |
| 2153 | + } |
| 2154 | + }, |
| 2155 | + "response": [] |
2063 | 2156 | } |
2064 | 2157 | ], |
2065 | 2158 | "protocolProfileBehavior": {} |
|
2115 | 2208 | }, |
2116 | 2209 | "response": [] |
2117 | 2210 | }, |
| 2211 | + { |
| 2212 | + "name": "Reset views table", |
| 2213 | + "event": [ |
| 2214 | + { |
| 2215 | + "listen": "test", |
| 2216 | + "script": { |
| 2217 | + "id": "0e26bd80-adcd-472d-a239-4b7cdc4403fb", |
| 2218 | + "exec": [ |
| 2219 | + "pm.test(\"Status code is 200\", function () {", |
| 2220 | + " pm.response.to.have.status(204);", |
| 2221 | + "});", |
| 2222 | + "" |
| 2223 | + ], |
| 2224 | + "type": "text/javascript" |
| 2225 | + } |
| 2226 | + } |
| 2227 | + ], |
| 2228 | + "request": { |
| 2229 | + "auth": { |
| 2230 | + "type": "noauth" |
| 2231 | + }, |
| 2232 | + "method": "DELETE", |
| 2233 | + "header": [ |
| 2234 | + { |
| 2235 | + "key": "debug-auth-token", |
| 2236 | + "type": "text", |
| 2237 | + "value": "{{debug_token}}" |
| 2238 | + } |
| 2239 | + ], |
| 2240 | + "url": { |
| 2241 | + "raw": "{{host}}/debug/views", |
| 2242 | + "host": [ |
| 2243 | + "{{host}}" |
| 2244 | + ], |
| 2245 | + "path": [ |
| 2246 | + "debug", |
| 2247 | + "views" |
| 2248 | + ] |
| 2249 | + } |
| 2250 | + }, |
| 2251 | + "response": [] |
| 2252 | + }, |
2118 | 2253 | { |
2119 | 2254 | "name": "DEBUG redis view all keys", |
2120 | 2255 | "request": { |
2121 | 2256 | "method": "GET", |
2122 | | - "header": [], |
| 2257 | + "header": [ |
| 2258 | + { |
| 2259 | + "key": "debug-auth-token", |
| 2260 | + "value": "xX69jules69Xx", |
| 2261 | + "type": "text" |
| 2262 | + } |
| 2263 | + ], |
2123 | 2264 | "url": { |
2124 | 2265 | "raw": "{{host}}/debug/redis", |
2125 | 2266 | "host": [ |
@@ -2168,109 +2309,109 @@ |
2168 | 2309 | ], |
2169 | 2310 | "variable": [ |
2170 | 2311 | { |
2171 | | - "id": "ba54d237-6790-4b6a-9516-a39706728255", |
| 2312 | + "id": "9ee0b458-242a-42c6-b5f8-e696eb8a0729", |
2172 | 2313 | "key": "host", |
2173 | 2314 | "value": "http://127.0.0.1:5000", |
2174 | 2315 | "type": "string" |
2175 | 2316 | }, |
2176 | 2317 | { |
2177 | | - "id": "83404c17-bd3c-4c78-bcbe-04fc63afcd2c", |
| 2318 | + "id": "6c597c98-eb07-40c7-8bd8-e8f2c7015b1b", |
2178 | 2319 | "key": "user_id", |
2179 | 2320 | "value": "", |
2180 | 2321 | "type": "string" |
2181 | 2322 | }, |
2182 | 2323 | { |
2183 | | - "id": "8f89a062-8871-4338-bf87-315bc90865ac", |
| 2324 | + "id": "532e183c-9ce0-4f3e-a516-3bd255e358ee", |
2184 | 2325 | "key": "user_email", |
2185 | 2326 | "value": "foo@example.org", |
2186 | 2327 | "type": "string" |
2187 | 2328 | }, |
2188 | 2329 | { |
2189 | | - "id": "7fe38071-c287-4ef7-b7bc-fade4e70ce41", |
| 2330 | + "id": "7abbc682-23eb-47b2-9892-bf5db23af497", |
2190 | 2331 | "key": "user_username", |
2191 | 2332 | "value": "foo", |
2192 | 2333 | "type": "string" |
2193 | 2334 | }, |
2194 | 2335 | { |
2195 | | - "id": "089c8889-0774-458b-9ff6-1768db6d496d", |
| 2336 | + "id": "982c50f4-bc18-4c6d-8938-282e36ba34de", |
2196 | 2337 | "key": "user_password", |
2197 | 2338 | "value": "admin", |
2198 | 2339 | "type": "string" |
2199 | 2340 | }, |
2200 | 2341 | { |
2201 | | - "id": "6049c136-632d-4096-85cf-e07936df0b98", |
| 2342 | + "id": "e8c39bfa-cf48-48fe-b231-501aff995bc4", |
2202 | 2343 | "key": "user_firstname", |
2203 | 2344 | "value": "Foo", |
2204 | 2345 | "type": "string" |
2205 | 2346 | }, |
2206 | 2347 | { |
2207 | | - "id": "2b124a77-82ee-471b-b0da-d67f33b51968", |
| 2348 | + "id": "4c7b2449-9f4f-4f74-8c85-489b5cd5937e", |
2208 | 2349 | "key": "user_lastname", |
2209 | 2350 | "value": "Bar", |
2210 | 2351 | "type": "string" |
2211 | 2352 | }, |
2212 | 2353 | { |
2213 | | - "id": "a747331a-a123-4ec5-815a-9a782bb221c2", |
| 2354 | + "id": "7a863c36-4345-4a6a-b0ad-a0b097cfef5f", |
2214 | 2355 | "key": "debug_token", |
2215 | 2356 | "value": "xX69jules69Xx", |
2216 | 2357 | "type": "string" |
2217 | 2358 | }, |
2218 | 2359 | { |
2219 | | - "id": "310d251f-935b-4bfa-9009-bfa2c9253fde", |
| 2360 | + "id": "47d8d8f4-c900-469e-8a7b-5a14ee64ad57", |
2220 | 2361 | "key": "user_access_token", |
2221 | 2362 | "value": "", |
2222 | 2363 | "type": "string" |
2223 | 2364 | }, |
2224 | 2365 | { |
2225 | | - "id": "dda8194b-da83-463a-8777-fdf09bd57397", |
| 2366 | + "id": "db2500a3-5115-4ef9-a554-cf6fda284240", |
2226 | 2367 | "key": "user_refresh_token", |
2227 | 2368 | "value": "", |
2228 | 2369 | "type": "string" |
2229 | 2370 | }, |
2230 | 2371 | { |
2231 | | - "id": "53a51049-0f79-44ed-94d2-776bff535df0", |
| 2372 | + "id": "90c8271c-0619-4735-bcaa-0ca95aa4f8ab", |
2232 | 2373 | "key": "expired_token", |
2233 | 2374 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU", |
2234 | 2375 | "type": "string" |
2235 | 2376 | }, |
2236 | 2377 | { |
2237 | | - "id": "6b0d9aef-9b57-4dd3-81d7-57f0eac7e050", |
| 2378 | + "id": "ce0863fb-3310-40cb-82ff-5a7a0a4e4857", |
2238 | 2379 | "key": "user_orientation", |
2239 | 2380 | "value": "heterosexual", |
2240 | 2381 | "type": "string" |
2241 | 2382 | }, |
2242 | 2383 | { |
2243 | | - "id": "5c9181e4-9016-4e21-96ea-5dc4068e7f2a", |
| 2384 | + "id": "94603d88-df49-4037-8355-ff595d910444", |
2244 | 2385 | "key": "user_bio", |
2245 | 2386 | "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.", |
2246 | 2387 | "type": "string" |
2247 | 2388 | }, |
2248 | 2389 | { |
2249 | | - "id": "a509cf68-fed7-498e-b193-ec4917ab5b64", |
| 2390 | + "id": "9eaf6774-eb9a-4f29-8755-edb8905b625e", |
2250 | 2391 | "key": "user_gender", |
2251 | 2392 | "value": "male", |
2252 | 2393 | "type": "string" |
2253 | 2394 | }, |
2254 | 2395 | { |
2255 | | - "id": "94c52bbf-019b-48ec-a981-fe71decd979f", |
| 2396 | + "id": "396db636-caf7-43e7-9e8c-cf70cd250c36", |
2256 | 2397 | "key": "user_birthdate", |
2257 | 2398 | "value": "1590674628", |
2258 | 2399 | "type": "string" |
2259 | 2400 | }, |
2260 | 2401 | { |
2261 | | - "id": "aa7335f6-3aa9-4993-bd22-6d2faeb0ef54", |
| 2402 | + "id": "d268c770-a5e1-4933-91d1-9fcdd0ef575e", |
2262 | 2403 | "key": "user_lat", |
2263 | 2404 | "value": "44.8404", |
2264 | 2405 | "type": "string" |
2265 | 2406 | }, |
2266 | 2407 | { |
2267 | | - "id": "5037aa20-cc43-483a-8d0f-5f289e3ed3a0", |
| 2408 | + "id": "d4fa040b-8348-4edd-839c-e4dfe2eec8d6", |
2268 | 2409 | "key": "user_lng", |
2269 | 2410 | "value": "-0.5805", |
2270 | 2411 | "type": "string" |
2271 | 2412 | }, |
2272 | 2413 | { |
2273 | | - "id": "21c4e9a3-fc74-4c92-9f6c-f5eb071db1c1", |
| 2414 | + "id": "6d890f0d-9211-4da8-b036-66c1dc204de0", |
2274 | 2415 | "key": "user_ip", |
2275 | 2416 | "value": "77.205.46.181", |
2276 | 2417 | "type": "string" |
|
0 commit comments