lib/model: Introduce setupModel test utility (#5524)

This commit is contained in:
Simon Frei
2019-02-12 13:18:13 +01:00
committed by Audrius Butkevicius
parent dc929946fe
commit d85ef949be
2 changed files with 43 additions and 154 deletions

View File

@@ -740,11 +740,7 @@ func setupModelWithConnection() (*Model, *fakeConnection, string, *config.Wrappe
}
func setupModelWithConnectionFromWrapper(w *config.Wrapper) (*Model, *fakeConnection) {
db := db.OpenMemory()
m := NewModel(w, myID, "syncthing", "dev", db, nil)
m.AddFolder(w.FolderList()[0])
m.ServeBackground()
m.StartFolder("default")
m := setupModel(w)
fc := addFakeConn(m, device1)
fc.folder = "default"