Skip to content

Commit 9705d20

Browse files
committed
Add many-to-many form Hurl workflow
1 parent cd29518 commit 9705d20

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

examples/modeling a many to many relationship with a form/test.hurl

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
GET http://localhost:8080/
2+
HTTP 200
3+
[Asserts]
4+
body contains "Recent blog posts"
5+
body contains "Write a post !"
6+
body not contains "An error occurred"
7+
8+
GET http://localhost:8080/write.sql
9+
HTTP 200
10+
[Asserts]
11+
body contains "Title of the post"
12+
body contains "Main Topic"
13+
body contains "Technology"
14+
body contains "Travel"
15+
body not contains "An error occurred"
16+
17+
POST http://localhost:8080/write_submit.sql
18+
Content-Type: application/x-www-form-urlencoded
19+
`Title=Hurl%20many-to-many%20post&Content=Hurl%20content%20for%20the%20many-to-many%20form.&Main%20Topic=1&Topics%5B%5D=2&Topics%5B%5D=3`
20+
HTTP 302
21+
[Captures]
22+
location: header "Location"
23+
[Asserts]
24+
header "Location" matches "^post\\.sql\\?id=\\d+$"
25+
26+
GET http://localhost:8080/{{location}}
27+
HTTP 200
28+
[Asserts]
29+
body contains "Hurl content for the many-to-many form."
30+
body contains "Technology"
31+
body contains "Travel"
32+
body contains "Food"
33+
body not contains "An error occurred"

0 commit comments

Comments
 (0)