gui: Add arrays for pending/ignored folders (fixes #5190) (#5192)

This commit is contained in:
Audrius Butkevicius authored and Simon Frei committed 2018-09-13 22:52:16 +02:00
1 parent a57fa9cfab
commit 710dba7f84
2 files changed
+23 -1

No files matched your search

+20
View File
@@ -1073,6 +1073,26 @@ func TestFilterURLSchemePrefix(t *testing.T) {
}
}
func TestDeviceConfigObservedNotNil(t *testing.T) {
cfg := Configuration{
Devices: []DeviceConfiguration{
{},
},
}
cfg.prepare(device1)
for _, dev := range cfg.Devices {
if dev.IgnoredFolders == nil {
t.Errorf("Ignored folders nil")
}
if dev.PendingFolders == nil {
t.Errorf("Pending folders nil")
}
}
}
// defaultConfigAsMap returns a valid default config as a JSON-decoded
// map[string]interface{}. This is useful to override random elements and
// re-encode into JSON.