|
1580 | 1580 | } |
1581 | 1581 | }, |
1582 | 1582 | "url": { |
1583 | | - "raw": "{{host}}/profile/email", |
| 1583 | + "raw": "{{host}}/profile/edit/email", |
1584 | 1584 | "host": [ |
1585 | 1585 | "{{host}}" |
1586 | 1586 | ], |
1587 | 1587 | "path": [ |
1588 | 1588 | "profile", |
| 1589 | + "edit", |
1589 | 1590 | "email" |
1590 | 1591 | ] |
1591 | 1592 | } |
|
1768 | 1769 | } |
1769 | 1770 | }, |
1770 | 1771 | "url": { |
1771 | | - "raw": "{{host}}/profile/email", |
| 1772 | + "raw": "{{host}}/profile/edit/email", |
1772 | 1773 | "host": [ |
1773 | 1774 | "{{host}}" |
1774 | 1775 | ], |
1775 | 1776 | "path": [ |
1776 | 1777 | "profile", |
| 1778 | + "edit", |
1777 | 1779 | "email" |
1778 | 1780 | ] |
1779 | 1781 | } |
1780 | 1782 | }, |
1781 | 1783 | "response": [] |
| 1784 | + }, |
| 1785 | + { |
| 1786 | + "name": "Edit password", |
| 1787 | + "event": [ |
| 1788 | + { |
| 1789 | + "listen": "test", |
| 1790 | + "script": { |
| 1791 | + "id": "f7b0849b-2da8-4c40-b2b2-fb1adde71c16", |
| 1792 | + "exec": [ |
| 1793 | + "var response = JSON.parse(responseBody);", |
| 1794 | + "", |
| 1795 | + "", |
| 1796 | + "pm.test(\"Status code is 200\", function () {", |
| 1797 | + " pm.response.to.have.status(200);", |
| 1798 | + "});", |
| 1799 | + "", |
| 1800 | + "", |
| 1801 | + "tests[\"success is true\"] = response.success == true", |
| 1802 | + "tests[\"Message is correct\"] = response.message == \"User password successfully updated.\"", |
| 1803 | + "pm.collectionVariables.set(\"user_password\", \"dolphin2\")" |
| 1804 | + ], |
| 1805 | + "type": "text/javascript" |
| 1806 | + } |
| 1807 | + } |
| 1808 | + ], |
| 1809 | + "request": { |
| 1810 | + "method": "PUT", |
| 1811 | + "header": [], |
| 1812 | + "body": { |
| 1813 | + "mode": "raw", |
| 1814 | + "raw": "{\n\t\"old_password\": \"{{user_password}}\",\n\t\"new_password\": \"dolphin2\"\n}", |
| 1815 | + "options": { |
| 1816 | + "raw": { |
| 1817 | + "language": "json" |
| 1818 | + } |
| 1819 | + } |
| 1820 | + }, |
| 1821 | + "url": { |
| 1822 | + "raw": "{{host}}/profile/edit/password", |
| 1823 | + "host": [ |
| 1824 | + "{{host}}" |
| 1825 | + ], |
| 1826 | + "path": [ |
| 1827 | + "profile", |
| 1828 | + "edit", |
| 1829 | + "password" |
| 1830 | + ] |
| 1831 | + } |
| 1832 | + }, |
| 1833 | + "response": [] |
| 1834 | + }, |
| 1835 | + { |
| 1836 | + "name": "Login user after password edit", |
| 1837 | + "event": [ |
| 1838 | + { |
| 1839 | + "listen": "test", |
| 1840 | + "script": { |
| 1841 | + "id": "6e4ec56d-ad5e-450b-805e-230bfd47f4d7", |
| 1842 | + "exec": [ |
| 1843 | + "var response = JSON.parse(responseBody);", |
| 1844 | + "", |
| 1845 | + "", |
| 1846 | + "pm.test(\"Status code is 200\", function () {", |
| 1847 | + " pm.response.to.have.status(200);", |
| 1848 | + "});", |
| 1849 | + "", |
| 1850 | + "tests[\"JSON return code is 200\"] = response.code == 200", |
| 1851 | + "", |
| 1852 | + "tests[\"success is true\"] = response.success == true", |
| 1853 | + "", |
| 1854 | + "tests[\"Is profile completed is 1\"] = response.return.is_profile_completed == 1", |
| 1855 | + "", |
| 1856 | + "pm.collectionVariables.set(\"user_access_token\", response.return.access_token);", |
| 1857 | + "pm.collectionVariables.set(\"user_refresh_token\", response.return.refresh_token);" |
| 1858 | + ], |
| 1859 | + "type": "text/javascript" |
| 1860 | + } |
| 1861 | + } |
| 1862 | + ], |
| 1863 | + "request": { |
| 1864 | + "method": "POST", |
| 1865 | + "header": [], |
| 1866 | + "body": { |
| 1867 | + "mode": "raw", |
| 1868 | + "raw": "{\n\t\"password\": \"{{user_password}}\",\n\t\"username\": \"{{user_email}}\"\n}", |
| 1869 | + "options": { |
| 1870 | + "raw": { |
| 1871 | + "language": "json" |
| 1872 | + } |
| 1873 | + } |
| 1874 | + }, |
| 1875 | + "url": { |
| 1876 | + "raw": "{{host}}/auth/login", |
| 1877 | + "host": [ |
| 1878 | + "{{host}}" |
| 1879 | + ], |
| 1880 | + "path": [ |
| 1881 | + "auth", |
| 1882 | + "login" |
| 1883 | + ] |
| 1884 | + } |
| 1885 | + }, |
| 1886 | + "response": [] |
1782 | 1887 | } |
1783 | 1888 | ], |
1784 | 1889 | "protocolProfileBehavior": {} |
|
1801 | 1906 | "pm.collectionVariables.set(\"user_lastname\", \"Bar\")", |
1802 | 1907 | "pm.collectionVariables.set(\"user_gender\", \"other\")", |
1803 | 1908 | "pm.collectionVariables.set(\"user_orientation\", \"bisexual\")", |
| 1909 | + "pm.collectionVariables.set(\"user_password\", \"admin\")", |
1804 | 1910 | "" |
1805 | 1911 | ], |
1806 | 1912 | "type": "text/javascript" |
|
1839 | 1945 | "method": "GET", |
1840 | 1946 | "header": [], |
1841 | 1947 | "url": { |
1842 | | - "raw": "http://127.0.0.1:5000/debug/redis", |
1843 | | - "protocol": "http", |
| 1948 | + "raw": "{{host}}/debug/redis", |
1844 | 1949 | "host": [ |
1845 | | - "127", |
1846 | | - "0", |
1847 | | - "0", |
1848 | | - "1" |
| 1950 | + "{{host}}" |
1849 | 1951 | ], |
1850 | | - "port": "5000", |
1851 | 1952 | "path": [ |
1852 | 1953 | "debug", |
1853 | 1954 | "redis" |
|
1891 | 1992 | ], |
1892 | 1993 | "variable": [ |
1893 | 1994 | { |
1894 | | - "id": "094262c7-3966-4dfa-a853-f1c5d51c2b44", |
| 1995 | + "id": "0b227a65-f661-47b2-8bc4-cbaadf557d17", |
1895 | 1996 | "key": "host", |
1896 | 1997 | "value": "http://127.0.0.1:5000", |
1897 | 1998 | "type": "string" |
1898 | 1999 | }, |
1899 | 2000 | { |
1900 | | - "id": "f20e8057-8051-4c8e-9c4e-26a827f3869a", |
| 2001 | + "id": "cda2689f-841d-40cf-83f7-126c84c175e5", |
1901 | 2002 | "key": "user_id", |
1902 | 2003 | "value": "", |
1903 | 2004 | "type": "string" |
1904 | 2005 | }, |
1905 | 2006 | { |
1906 | | - "id": "e9df5103-fe2c-43d4-9af7-c75f8c2e807d", |
| 2007 | + "id": "901e9e11-29dd-4cff-9f8f-5ef222000d7d", |
1907 | 2008 | "key": "user_email", |
1908 | 2009 | "value": "foo@example.org", |
1909 | 2010 | "type": "string" |
1910 | 2011 | }, |
1911 | 2012 | { |
1912 | | - "id": "60e17880-09b8-4d3e-8469-b981889cfc2d", |
| 2013 | + "id": "873da2ea-7d43-4e13-a409-2a42f5b3fada", |
1913 | 2014 | "key": "user_username", |
1914 | 2015 | "value": "foo", |
1915 | 2016 | "type": "string" |
1916 | 2017 | }, |
1917 | 2018 | { |
1918 | | - "id": "17f0f4d6-706b-4b1a-af55-4dce7951b034", |
| 2019 | + "id": "11c9af91-cfc0-4bac-a197-6f3efa0edf42", |
1919 | 2020 | "key": "user_password", |
1920 | 2021 | "value": "admin", |
1921 | 2022 | "type": "string" |
1922 | 2023 | }, |
1923 | 2024 | { |
1924 | | - "id": "56bde633-3094-4e67-b371-6988ee53f656", |
| 2025 | + "id": "4bb1d9e2-3eee-49b0-9591-8a87e4b28a05", |
1925 | 2026 | "key": "user_firstname", |
1926 | 2027 | "value": "Foo", |
1927 | 2028 | "type": "string" |
1928 | 2029 | }, |
1929 | 2030 | { |
1930 | | - "id": "b1e5aef2-ccc1-4dcd-9f30-72de325d356f", |
| 2031 | + "id": "69f58f99-73b4-4fc6-bfe6-46ff80240ce2", |
1931 | 2032 | "key": "user_lastname", |
1932 | 2033 | "value": "Bar", |
1933 | 2034 | "type": "string" |
1934 | 2035 | }, |
1935 | 2036 | { |
1936 | | - "id": "70de06f1-3986-4d0c-8896-fa1d407c9ab7", |
| 2037 | + "id": "e305f6b4-a16d-48e0-b3df-da36fffd800b", |
1937 | 2038 | "key": "debug_token", |
1938 | 2039 | "value": "xX69jules69Xx", |
1939 | 2040 | "type": "string" |
1940 | 2041 | }, |
1941 | 2042 | { |
1942 | | - "id": "af19a08b-cac2-407e-aad0-a50701a46b00", |
| 2043 | + "id": "89274e60-1321-42ab-9158-6518061bbb5d", |
1943 | 2044 | "key": "user_access_token", |
1944 | 2045 | "value": "", |
1945 | 2046 | "type": "string" |
1946 | 2047 | }, |
1947 | 2048 | { |
1948 | | - "id": "aa09044e-e5cf-4f2d-b3e7-e36ae5a69768", |
| 2049 | + "id": "998a540c-261c-4202-84ea-fb7734042831", |
1949 | 2050 | "key": "user_refresh_token", |
1950 | 2051 | "value": "", |
1951 | 2052 | "type": "string" |
1952 | 2053 | }, |
1953 | 2054 | { |
1954 | | - "id": "491d80fa-5b4a-4b45-a20d-bf78b25956c3", |
| 2055 | + "id": "3553c278-be1c-4547-80a8-5f2c221a40f9", |
1955 | 2056 | "key": "expired_token", |
1956 | 2057 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU", |
1957 | 2058 | "type": "string" |
1958 | 2059 | }, |
1959 | 2060 | { |
1960 | | - "id": "a371fdfe-b9d2-4c9f-ba66-70d4c9ff2642", |
| 2061 | + "id": "b4792aa7-be9a-45e7-9420-4ddae8a688b7", |
1961 | 2062 | "key": "user_orientation", |
1962 | 2063 | "value": "heterosexual", |
1963 | 2064 | "type": "string" |
1964 | 2065 | }, |
1965 | 2066 | { |
1966 | | - "id": "cc1b47ba-e150-4129-8875-95508dc6fa71", |
| 2067 | + "id": "b4f62225-257f-40dc-b89a-517c054381bd", |
1967 | 2068 | "key": "user_bio", |
1968 | 2069 | "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.", |
1969 | 2070 | "type": "string" |
1970 | 2071 | }, |
1971 | 2072 | { |
1972 | | - "id": "4b28aa5c-618c-48ff-a301-d237ce387e3e", |
| 2073 | + "id": "f4264583-0652-4208-9490-f130eec59dfb", |
1973 | 2074 | "key": "user_gender", |
1974 | 2075 | "value": "male", |
1975 | 2076 | "type": "string" |
1976 | 2077 | }, |
1977 | 2078 | { |
1978 | | - "id": "c8757bb2-7bb4-4b1a-9ac5-f5e2e9b13e5a", |
| 2079 | + "id": "6c69f0b0-9c4a-4566-b37f-27c4f445dc6c", |
1979 | 2080 | "key": "user_birthdate", |
1980 | 2081 | "value": "1590674628", |
1981 | 2082 | "type": "string" |
|
0 commit comments