forked from robwhitby/shakedown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample-test.sh
More file actions
executable file
·18 lines (14 loc) · 1000 Bytes
/
sample-test.sh
File metadata and controls
executable file
·18 lines (14 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
source $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/shakedown.sh # load the framework
shakedown GET /about # make a GET request
status 200 # assert response status is 200
content_type 'text/html' # assert content type contains string
header 'Expires' # assert response header exists containing string
contains 'Take back your privacy!' # assert resposne body contains string
shakedown POST / -d 'q=Shakedown' # make a POST request with form data
status 200
contains 'Bob Seger'
shakedown GET http://www.google.com -L # provide full url to override default base url.
status 200 # -L cURL option to follow redirects
shakedown GET http://www.google.com
header_contains 'Referrer-Policy' 'no-referrer' # assert header 'Referrer-Policy' contains value 'no-referrer'