Fix #168: compact corner notification pill for paste creation
This commit is contained in:
@@ -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)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user