mirror of
https://github.com/zoriya/blog.git
synced 2025-12-06 06:26:10 +00:00
add hurl test
This commit is contained in:
@@ -3,5 +3,6 @@ pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
bun
|
||||
go
|
||||
hurl
|
||||
];
|
||||
}
|
||||
|
||||
12
content/blogs/phantom-token/test.hurl
Normal file
12
content/blogs/phantom-token/test.hurl
Normal file
@@ -0,0 +1,12 @@
|
||||
POST http://localhost:7891/auth/user
|
||||
{ "name": "pina" }
|
||||
HTTP 201
|
||||
[Captures]
|
||||
session_token: jsonpath "$['token']"
|
||||
|
||||
GET http://localhost:7891/api/me
|
||||
authorization: Bearer {{session_token}}
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
jsonpath "$['sub']" == "pina"
|
||||
jsonpath "$['iss']" == "keibi-blog"
|
||||
Reference in New Issue
Block a user