Ruta; Funciona el endpoint
This commit is contained in:
@@ -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": ""
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
name: Local development server
|
||||
color: "#2E8A54"
|
||||
variables:
|
||||
- name: baseUrl
|
||||
value: http://localhost:3000
|
||||
Reference in New Issue
Block a user