/
githubmirror
/
realworld
Обзор
Документация
Войти
/
githubmirror
/
realworld
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
specs/api/hurl/errors_profiles.hurl
44 строки
1020 B
c4ffein
specs: api moved into specs
22 фев 2026, 00:51
22 фев 2026, 00:51
790c609
Код
Авторство
О чём код?
# GET unknown profile GET {{host}}/api/profiles/unknown-user-{{uid}} HTTP 404 [Asserts] jsonpath "$.errors.profile[0]" == "not found" # Follow no auth POST {{host}}/api/profiles/unknown-user-{{uid}}/follow HTTP 401 [Asserts] jsonpath "$.errors.token[0]" == "is missing" # Unfollow no auth DELETE {{host}}/api/profiles/unknown-user-{{uid}}/follow HTTP 401 [Asserts] jsonpath "$.errors.token[0]" == "is missing" # Setup: Register for authenticated 404 tests POST {{host}}/api/users { "user": { "username": "ep_{{uid}}", "email": "ep_{{uid}}@test.com", "password": "password123" } } HTTP 201 [Captures] token: jsonpath "$.user.token" # Follow unknown user (authed) POST {{host}}/api/profiles/unknown-user-{{uid}}/follow Authorization: Token {{token}} HTTP 404 [Asserts] jsonpath "$.errors.profile[0]" == "not found" # Unfollow unknown user (authed) DELETE {{host}}/api/profiles/unknown-user-{{uid}}/follow Authorization: Token {{token}} HTTP 404 [Asserts] jsonpath "$.errors.profile[0]" == "not found"