contractcourt/briefcase: test FetchContractResolutions error when no resolutions logged

This commit is contained in:
Johan T. Halseth 2018-08-21 12:53:56 +02:00
parent 53286b8cee
commit b031d87daf
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -532,6 +532,13 @@ func TestContractResolutionsStorage(t *testing.T) {
},
}
// First make sure that fetching unlogged contract resolutions will
// fail.
_, err = testLog.FetchContractResolutions()
if err == nil {
t.Fatalf("expected reading unlogged resolution from db to fail")
}
// Insert the resolution into the database, then immediately retrieve
// them so we can compare equality against the original version.
if err := testLog.LogContractResolutions(&res); err != nil {