This commit is contained in:
kankys committed 2026-09-15 20:50:51 +02:00
1 parent 4b7af6ee7a
commit 2e185b47ef
12 files changed
+213 -6

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
info:
name: Get spells
type: http
seq: 3
http:
method: GET
url: http://localhost:3000/spells?type=Curse&limit=2
params:
- name: type
value: Curse
type: query
- name: limit
value: "2"
type: query
auth: inherit
runtime:
scripts:
- type: tests
code: |-
const body = res.getBody()
// Ověřím že se mi vrací Curse z (Query Params)
test("Each spell should have type Curse", function(){
body.forEach(spellMember => expect(spellMember.type).to.eql("Curse"))
});
// Ověřím že se mi vrací pouze 2 záznamy (limit)
test("Response should contain exactly 2 spells", function(){
expect(body).has.length(2)
});
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false