Update protected files
This commit is contained in:
committed by
GitHub
parent
baa5be9aea
commit
b9a7654830
+69
-68
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "c30d4269-9aa0-4d39-a5de-37901602b269",
|
||||
"_postman_id": "a5dbb75a-d7a8-4e8c-8660-9925345a3a86",
|
||||
"name": "PROD round 2: public tests [1]",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
@@ -451,41 +451,40 @@
|
||||
" var resp = response.json();",
|
||||
" pm.expect(response.code).to.be.oneOf([201, 409], \"Invalid response code status\");",
|
||||
" });",
|
||||
" });",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Sign in\", function () {",
|
||||
" var url = pm.variables.get(\"base_url\") + \"/auth/sign-in\";",
|
||||
" const options = {",
|
||||
" url: url,",
|
||||
" method: 'POST',",
|
||||
" header: {",
|
||||
" 'Content-Type': 'application/json',",
|
||||
" },",
|
||||
" body: {",
|
||||
" mode: 'raw',",
|
||||
" raw: JSON.stringify({",
|
||||
" 'login': 'yellowMonkey11000',",
|
||||
" 'password': '$aba4821FWfew01#.fewA$',",
|
||||
" })",
|
||||
" }",
|
||||
" };",
|
||||
" pm.test(\"Sign in\", function () {",
|
||||
" var url = pm.variables.get(\"base_url\") + \"/auth/sign-in\";",
|
||||
" const options = {",
|
||||
" url: url,",
|
||||
" method: 'POST',",
|
||||
" header: {",
|
||||
" 'Content-Type': 'application/json',",
|
||||
" },",
|
||||
" body: {",
|
||||
" mode: 'raw',",
|
||||
" raw: JSON.stringify({",
|
||||
" 'login': 'yellowMonkey11000',",
|
||||
" 'password': '$aba4821FWfew01#.fewA$',",
|
||||
" })",
|
||||
" }",
|
||||
" };",
|
||||
"",
|
||||
" pm.sendRequest(options, function (err, response) {",
|
||||
" pm.test(\"Validate sign-in response\", () => {",
|
||||
" var resp = response.json();",
|
||||
" pm.sendRequest(options, function (err, response) {",
|
||||
" pm.test(\"Validate sign-in response\", () => {",
|
||||
" var resp = response.json();",
|
||||
"",
|
||||
" pm.expect(response.code).to.be.eq(200, \"Invalid response code status\");",
|
||||
" pm.expect(tv4.validate(resp, schema), \"Invalid JSON schema\").to.be.true;",
|
||||
" pm.expect(response.code).to.be.eq(200, \"Invalid response code status\");",
|
||||
" pm.expect(tv4.validate(resp, schema), \"Invalid JSON schema\").to.be.true;",
|
||||
"",
|
||||
" console.log('Token', resp.token);",
|
||||
" console.log('Token', resp.token);",
|
||||
" });",
|
||||
" });",
|
||||
" });",
|
||||
" });",
|
||||
"});",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"type": "text/javascript"
|
||||
@@ -561,56 +560,56 @@
|
||||
" var resp = response.json();",
|
||||
" pm.expect(response.code).to.be.oneOf([201, 409], \"Invalid response code status\");",
|
||||
" });",
|
||||
" });",
|
||||
"});",
|
||||
"",
|
||||
"pm.test(\"Sign in\", function () {",
|
||||
" var url = pm.variables.get(\"base_url\") + \"/auth/sign-in\";",
|
||||
" const options = {",
|
||||
" url: url,",
|
||||
" method: 'POST',",
|
||||
" header: {",
|
||||
" 'Content-Type': 'application/json',",
|
||||
" },",
|
||||
" body: {",
|
||||
" mode: 'raw',",
|
||||
" raw: JSON.stringify({",
|
||||
" 'login': 'yellowMonkey11000',",
|
||||
" 'password': '$aba4821FWfew01#.fewA$',",
|
||||
" })",
|
||||
" }",
|
||||
" };",
|
||||
" pm.test(\"Sign in\", function () {",
|
||||
" var url = pm.variables.get(\"base_url\") + \"/auth/sign-in\";",
|
||||
" const options = {",
|
||||
" url: url,",
|
||||
" method: 'POST',",
|
||||
" header: {",
|
||||
" 'Content-Type': 'application/json',",
|
||||
" },",
|
||||
" body: {",
|
||||
" mode: 'raw',",
|
||||
" raw: JSON.stringify({",
|
||||
" 'login': 'yellowMonkey11000',",
|
||||
" 'password': '$aba4821FWfew01#.fewA$',",
|
||||
" })",
|
||||
" }",
|
||||
" };",
|
||||
"",
|
||||
" pm.sendRequest(options, function (err, response) {",
|
||||
" pm.test(\"Validate sign-in response\", () => {",
|
||||
" var resp = response.json();",
|
||||
" pm.sendRequest(options, function (err, response) {",
|
||||
" pm.test(\"Validate sign-in response\", () => {",
|
||||
" var resp = response.json();",
|
||||
"",
|
||||
" pm.expect(response.code).to.be.eq(200, \"Invalid response code status\");",
|
||||
" pm.expect(tv4.validate(resp, schema), \"Invalid JSON schema\").to.be.true;",
|
||||
" pm.expect(response.code).to.be.eq(200, \"Invalid response code status\");",
|
||||
" pm.expect(tv4.validate(resp, schema), \"Invalid JSON schema\").to.be.true;",
|
||||
"",
|
||||
" pm.environment.set(\"05_profile_token\", resp.token);",
|
||||
" console.log(\"Token has been saved\")",
|
||||
" pm.environment.set(\"05_profile_token\", resp.token);",
|
||||
" console.log(\"Token has been saved\")",
|
||||
"",
|
||||
" pm.test(\"Get profile\", function () {",
|
||||
" const url = pm.variables.get(\"base_url\") + \"/me/profile\";",
|
||||
" const token = pm.environment.get(\"05_profile_token\");",
|
||||
" const options = {",
|
||||
" url: url,",
|
||||
" method: 'GET',",
|
||||
" header: {",
|
||||
" 'Content-Type': 'application/json',",
|
||||
" 'Authorization': `Bearer ${token}`,",
|
||||
" },",
|
||||
" };",
|
||||
" pm.test(\"Get profile\", function () {",
|
||||
" const url = pm.variables.get(\"base_url\") + \"/me/profile\";",
|
||||
" const token = pm.environment.get(\"05_profile_token\");",
|
||||
" const options = {",
|
||||
" url: url,",
|
||||
" method: 'GET',",
|
||||
" header: {",
|
||||
" 'Content-Type': 'application/json',",
|
||||
" 'Authorization': `Bearer ${token}`,",
|
||||
" },",
|
||||
" };",
|
||||
"",
|
||||
" pm.sendRequest(options, function (err, response) {",
|
||||
" pm.test(\"Validate profile\", () => {",
|
||||
" var resp = response.json();",
|
||||
" pm.sendRequest(options, function (err, response) {",
|
||||
" pm.test(\"Validate profile\", () => {",
|
||||
" var resp = response.json();",
|
||||
"",
|
||||
" pm.expect(response.code).to.be.eq(200, \"Invalid response code status\");",
|
||||
" pm.expect(response.code).to.be.eq(200, \"Invalid response code status\");",
|
||||
"",
|
||||
" console.log(\"Got profile\", resp);",
|
||||
" pm.expect(resp.login).to.be.eq(\"yellowMonkey11000\", \"Invalid login\");",
|
||||
" console.log(\"Got profile\", resp);",
|
||||
" pm.expect(resp.login).to.be.eq(\"yellowMonkey11000\", \"Invalid login\");",
|
||||
" });",
|
||||
" });",
|
||||
" });",
|
||||
" });",
|
||||
" });",
|
||||
@@ -622,6 +621,8 @@
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"type": "text/javascript"
|
||||
|
||||
Reference in New Issue
Block a user