From dd9485f27cadea7ca9677e39335c674d662422b3 Mon Sep 17 00:00:00 2001 From: Gregory Date: Fri, 24 Jan 2020 09:45:53 +0400 Subject: [PATCH] Better russian language (#37542) --- ...sing-chai-http-iii---put-method.russian.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/curriculum/challenges/russian/06-information-security-and-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-on-an-api-response-using-chai-http-iii---put-method.russian.md b/curriculum/challenges/russian/06-information-security-and-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-on-an-api-response-using-chai-http-iii---put-method.russian.md index 9faf290332..68cf2da0c1 100644 --- a/curriculum/challenges/russian/06-information-security-and-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-on-an-api-response-using-chai-http-iii---put-method.russian.md +++ b/curriculum/challenges/russian/06-information-security-and-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-on-an-api-response-using-chai-http-iii---put-method.russian.md @@ -8,12 +8,12 @@ localeTitle: Запуск функциональных тестов при от ## Description
-Напомним, что этот проект строится на следующем стартовом проекте Glitch или клонируется из GitHub . В следующем примере мы увидим, как отправлять данные в полезную нагрузку (тело) запроса. Мы собираемся протестировать запрос PUT. Конечная точка «/ путешественников» принимает объект JSON, который принимает структуру: {фамилия: [фамилия путешественника прошлого]}. Маршрут отвечает: {name: [имя], фамилия: [фамилия], даты : [birth - death years]} см. код сервера для получения более подробной информации. Отправить {фамилия: «Коломбо»}. Замените assert.fail () и выполните тестовый проход. Проверить 1) статус, 2) тип, 3) body.name, 4) body.surname Следуйте приведенному выше порядку утверждения, мы полагаемся на него. +Напомним, что этот проект строится на следующем стартовом проекте Glitch или клонируется из GitHub . В следующем примере мы увидим, как отправлять данные в полезную нагрузку (тело) запроса. Мы собираемся протестировать запрос PUT. Конечная точка «/ путешественников» принимает объект JSON, который принимает структуру: {фамилия: [фамилия путешественника прошлого]}. Маршрут отвечает: {name: [имя], фамилия: [фамилия], даты : [годы рождения-смерти]} см. код сервера для получения более подробной информации. Отправить {фамилия: «Коломбо»}. Замените assert.fail () и выполните тестовый проход. Проверить 1) статус, 2) тип, 3) body.name, 4) body.surname Следуйте приведенному выше порядку утверждения, мы полагаемся на него.
## Instructions
-Send
+Отправьте
```json { @@ -21,9 +21,9 @@ Send
} ``` -Replace assert.fail() and make the test pass. -Check for 1) status, 2) type, 3) body.name, 4) body.surname. -Follow the assertion order above, We rely on it. +Замените assert.fail() и пройдите тест. +Проверьте на 1) status, 2) type, 3) body.name, 4) body.surname. +Следуйте порядку утверждения выше, мы полагаемся на это.
## Tests @@ -31,15 +31,15 @@ Follow the assertion order above, We rely on it. ```yml tests: - - text: All tests should pass + - text: Все тесты должны быть пройдены testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=2').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); }) - - text: You should test for 'res.status' to be 200 + - text: Вы должны пройти тест 'res.status' с результатом 200 testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=2').then(data => { assert.equal(data.assertions[0].method, 'equal'); assert.equal(data.assertions[0].args[0], 'res.status'); assert.equal(data.assertions[0].args[1], '200');}, xhr => { throw new Error(xhr.responseText); }) - - text: You should test for 'res.type' to be 'application/json' + - text: Вы должны пройти тест 'res.type' с результатом 'application/json' testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=2').then(data => { assert.equal(data.assertions[1].method, 'equal'); assert.equal(data.assertions[1].args[0], 'res.type'); assert.equal(data.assertions[1].args[1], '\'application/json\'');}, xhr => { throw new Error(xhr.responseText); }) - - text: You should test for 'res.body.name' to be 'Cristoforo' + - text: Вы должны пройти тест 'res.body.name'с результатом 'Cristoforo' testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=2').then(data => { assert.equal(data.assertions[2].method, 'equal'); assert.equal(data.assertions[2].args[0], 'res.body.name'); assert.equal(data.assertions[2].args[1], '\'Cristoforo\'');}, xhr => { throw new Error(xhr.responseText); }) - - text: You should test for 'res.body.surname' to be 'Colombo' + - text: Вы должны пройти тест 'res.body.surname' с результатом 'Colombo' testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=2').then(data => { assert.equal(data.assertions[3].method, 'equal'); assert.equal(data.assertions[3].args[0], 'res.body.surname'); assert.equal(data.assertions[3].args[1], '\'Colombo\'');}, xhr => { throw new Error(xhr.responseText); }) ```