mirror of
https://github.com/LukasKanka/api_test.git
synced 2026-11-11 06:34:36 +01:00
cicdupdate6
This commit is contained in:
1 parent
8c8ba988ec
commit
4ef7925897
4 files changed
+3
-1
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# Secrets
|
||||
.env*
|
||||
|
||||
# Dependencies
|
||||
node_modules
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -0,0 +1,43 @@
|
||||
info:
|
||||
name: ShortingHat
|
||||
type: http
|
||||
seq: 1
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: http://localhost:3000/sortingHat
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: tests
|
||||
code: |-
|
||||
const status = res.getStatus()
|
||||
const body = res.getBody()
|
||||
|
||||
test("Status code is 200", function() {
|
||||
expect(status).to.equal(200);
|
||||
});
|
||||
|
||||
test("Response should contain sortingHat key", function(){
|
||||
expect(body).to.contain.key("sortingHatSays")
|
||||
})
|
||||
|
||||
test("Message from sorting hat should not be empty", function(){
|
||||
expect(res.getBody().sortingHatSays).not.to.be.empty
|
||||
})
|
||||
|
||||
test("Message from house should not be empty", function(){
|
||||
expect(res.getBody().house).not.to.be.empty
|
||||
})
|
||||
|
||||
test("House is one of Gryffindor, Slytherin, Ravenclaw, Hufflepuff",function(){
|
||||
expect(res.getBody().house).is.oneOf(["Gryffindor", "Slytherin", "Ravenclaw", "Hufflepuff" ])
|
||||
})
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
forwardAuthorizationHeader: false
|
||||
@@ -0,0 +1,26 @@
|
||||
opencollection: 1.0.0
|
||||
|
||||
info:
|
||||
name: PotterAPI
|
||||
config:
|
||||
proxy:
|
||||
inherit: true
|
||||
config:
|
||||
protocol: http
|
||||
hostname: ""
|
||||
port: ""
|
||||
auth:
|
||||
username: ""
|
||||
password: ""
|
||||
bypassProxy: ""
|
||||
|
||||
request:
|
||||
headers:
|
||||
- name: localhost
|
||||
value: http://localhost:3000/
|
||||
bundled: false
|
||||
extensions:
|
||||
bruno:
|
||||
ignore:
|
||||
- node_modules
|
||||
- .git
|
||||
Reference in new issue
Block a user