Commit 19dfccc3 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add test for upgrading AllowSubgroups.

parent 96f69c07
......@@ -59,7 +59,7 @@ func TestEmptyJSON(t *testing.T) {
var descJSON = `
{
"max-history-age": 10,
"allow-subgroups": true,
"auto-subgroups": true,
"users": {
"jch": {"password": "topsecret", "permissions": "op"},
"john": {"password": "secret", "permissions": "present"},
......@@ -125,6 +125,11 @@ func TestUpgradeDescription(t *testing.T) {
t.Fatalf("upgradeDescription: %v", err)
}
if d1.AutoSubgroups != d2.AutoSubgroups ||
d1.AllowSubgroups != d2.AllowSubgroups {
t.Errorf("AllowSubgroups not upgraded correctly")
}
if d2.Op != nil || d2.Presenter != nil || d2.Other != nil {
t.Errorf("legacy field is not nil")
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment