Ruta; Funciona el endpoint

This commit is contained in:
2026-03-10 16:34:04 +01:00
parent fb4563b44a
commit 005e66679d
7 changed files with 71 additions and 14 deletions

View File

@@ -10,11 +10,25 @@ http:
type: json
data: |-
{
"cardId": "",
"card_id": "1234",
"override": false
}
auth: inherit
runtime:
scripts:
- type: tests
code: |-
test("Should return 200", () => {
const body = res.getBody()
expect(res.getStatus()).to.equal(200)
})
test("Body should include the label", () => {
const body = res.getBody()
expect(body.label).to.be.defined()
)}
settings:
encodeUrl: true
timeout: 0
@@ -31,7 +45,7 @@ examples:
type: json
data: |-
{
"cardId": "",
"card_id": "",
"override": false
}
response:
@@ -58,7 +72,7 @@ examples:
type: json
data: |-
{
"cardId": "",
"card_id": "",
"override": false
}
response:
@@ -85,7 +99,7 @@ examples:
type: json
data: |-
{
"cardId": "",
"card_id": "",
"override": false
}
response:
@@ -93,4 +107,7 @@ examples:
statusText: Internal Server Error
body:
type: text
data: ""
data: |-
{
"error": ""
}

View File

@@ -8,6 +8,22 @@ http:
url: "{{baseUrl}}/health"
auth: inherit
runtime:
scripts:
- type: tests
code: |-
test("Should return 200", () => {
const body = res.getBody()
expect(res.getStatus()).to.equal(200)
})
test("Body should be ok:true", () => {
const body = res.getBody()
expect(body).to.eql({
ok:true
})
})
settings:
encodeUrl: true
timeout: 0

View File

@@ -1,4 +1,5 @@
name: Local development server
color: "#2E8A54"
variables:
- name: baseUrl
value: http://localhost:3000