aboutsummaryrefslogtreecommitdiffstats
path: root/server/server_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server_test.go')
-rw-r--r--server/server_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/server_test.go b/server/server_test.go
index 72f5b9c..d19c5e8 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -117,6 +117,16 @@ func TestCreateAndRead(t *testing.T) {
}
}
+func TestCompactionBlock(t *testing.T) {
+ h := newHarness(t, nil)
+ withC := strings.Replace(session, `"c":[`, `"c":[{"r":"c","x":"earlier summary"},`, 1)
+ r := h.create(`{"payload":` + payload(withC) + `}`)
+ txt := h.do("GET", "/share/"+r.ID+".txt", "", "").Body.String()
+ if !strings.Contains(txt, "--- context compacted here ---") || strings.Contains(txt, "earlier summary") {
+ t.Fatalf("txt: %s", txt)
+ }
+}
+
func TestUpdateAndDeleteNeedTheSecret(t *testing.T) {
h := newHarness(t, nil)
r := h.create(`{"payload":` + payload() + `}`)