Versendung mit .ics Kalenderdatei
This commit is contained in:
1 parent
c08d43e7dd
commit
dc20d7ec5a
13 files changed
+650
-54
No files matched your search
@@ -78,11 +78,27 @@ func TestDispatchPageAndPreferences(t *testing.T) {
|
||||
if preference.Channel != "print" || preference.Variant != "full" || !preference.Cover {
|
||||
t.Fatalf("unexpected preference: %+v", preference)
|
||||
}
|
||||
if got := st.TenantSetting(ctx, tenantID, dispatchIntroKey); !strings.Contains(got, "{start}") {
|
||||
t.Fatalf("intro setting = %q", got)
|
||||
if got := st.TenantSetting(ctx, tenantID, dispatchIntroKey); got != "" {
|
||||
t.Fatalf("legacy intro setting should stay untouched, got %q", got)
|
||||
}
|
||||
if got := st.TenantSetting(ctx, tenantID, dispatchGreetingKey); got != "Mit Grüßen" {
|
||||
t.Fatalf("greeting setting = %q", got)
|
||||
editor, err := st.UserByUsername(ctx, "editor")
|
||||
if err != nil || editor == nil {
|
||||
t.Fatalf("editor account: %v", err)
|
||||
}
|
||||
if got := st.TenantSetting(ctx, tenantID, dispatchUserKey(dispatchUserIntroKey, editor.ID)); !strings.Contains(got, "{start}") {
|
||||
t.Fatalf("per-editor intro setting = %q", got)
|
||||
}
|
||||
if got := st.TenantSetting(ctx, tenantID, dispatchUserKey(dispatchUserGreetingKey, editor.ID)); got != "Mit Grüßen" {
|
||||
t.Fatalf("per-editor greeting setting = %q", got)
|
||||
}
|
||||
|
||||
// Reopening the page reuses the text saved for this editor account.
|
||||
reloaded := get(t, client, ts.URL+"/dispatch?"+dispatchRange, http.StatusOK)
|
||||
if !strings.Contains(reloaded, "Liebe Leute, anbei der Plan von") {
|
||||
t.Fatal("saved intro text is not reused on the next page load")
|
||||
}
|
||||
if !strings.Contains(reloaded, "Mit Grüßen") {
|
||||
t.Fatal("saved greeting is not reused on the next page load")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user