-
-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathtest.hurl
More file actions
59 lines (51 loc) · 1.28 KB
/
test.hurl
File metadata and controls
59 lines (51 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
GET http://localhost:8080
HTTP 200
[Asserts]
body contains "SQLPage Authentication Demo"
body contains "Access protected page"
body not contains "An error occurred"
GET http://localhost:8080/signin.sql
HTTP 200
[Asserts]
body contains "Sign in"
body contains "Username"
body contains "Password"
GET http://localhost:8080/protected_page.sql
HTTP 302
[Asserts]
header "Location" contains "signin.sql?error"
GET http://localhost:8080/signin.sql?error
HTTP 200
[Asserts]
body contains "We could not authenticate you"
body htmlUnescape contains "href=\"signup.sql\""
POST http://localhost:8080/create_user.sql
[FormParams]
username: hurl_user
password: Password123
terms: on
HTTP 302
[Asserts]
header "Location" contains "create_user_welcome_message.sql?username=hurl_user"
POST http://localhost:8080/login.sql
[FormParams]
username: hurl_user
password: Password123
HTTP 302
[Asserts]
cookie "session" exists
header "Location" contains "protected_page.sql"
GET http://localhost:8080/protected_page.sql
HTTP 200
[Asserts]
body contains "Welcome, hurl_user"
body contains "top secret"
body not contains "An error occurred"
GET http://localhost:8080/logout.sql
HTTP 302
[Asserts]
header "Location" == "/"
GET http://localhost:8080/protected_page.sql
HTTP 302
[Asserts]
header "Location" contains "signin.sql?error"