0431c76 / test/push.sh
diff --git a/test/push.sh b/test/push.sh
index 12486b1..4ac091b 100644
--- a/test/push.sh
+++ b/test/push.sh
@@ -58,6 +58,13 @@ curl -fsS "http://127.0.0.1:$port/feed" >"$scratch/feed"
test "$(grep -c 'Pushed 1 commit' "$scratch/feed")" -eq 1
grep -F "href=\"/commit/$new\"" "$scratch/feed"
grep -F ' Update</li>' "$scratch/feed"
+raw_path=$(sed -n 's/.*href="\(\/raw?post=[^"]*\)".*/\1/p' "$scratch/feed")
+test -n "$raw_path"
+curl -fsS "http://127.0.0.1:$port$raw_path" | node -e '
+ const record = JSON.parse(require("node:fs").readFileSync(0))
+ const body = JSON.parse(record.content)
+ if (body.type !== "git-push" || body.commit !== process.argv[1]) process.exit(1)
+' "$new"
update_query=$(sed -n 's/.*href="?update=\([^"]*\)".*/\1/p' "$scratch/feed")
test -n "$update_query"
curl -fsS "http://127.0.0.1:$port/feed?update=$update_query" | grep -F 'Pushed 1 commit'
Git ยท Social feed