Fix #168: compact corner notification pill for paste creation

This commit is contained in:
fen
2026-09-10 11:24:24 -05:00
parent bead90699d
commit aa4d017631
6 changed files with 29 additions and 16 deletions
+10 -2
View File
@@ -91,7 +91,15 @@ func TestCreatedBannerViaCookie(t *testing.T) {
if rec2.Code != 200 {
t.Fatalf("paste view: got %d", rec2.Code)
}
if !strings.Contains(rec2.Body.String(), tok) {
t.Error("created banner does not show the deletion token (#143 cookie flow broken)")
// #168: the created pill no longer prints the deletion token; the token
// still arrives via the one-time cookie flow (re-set on the view response).
var got bool
for _, c := range rec2.Result().Cookies() {
if c.Name == "tok_"+id && c.Value == tok {
got = true
}
}
if !got {
t.Error("created view did not re-set the deletion token cookie (#143 cookie flow broken)")
}
}