diff options
Diffstat (limited to 'modules/system/appstate_test.go')
-rw-r--r-- | modules/system/appstate_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/system/appstate_test.go b/modules/system/appstate_test.go index 232362cf0c..d4b9e167c2 100644 --- a/modules/system/appstate_test.go +++ b/modules/system/appstate_test.go @@ -6,6 +6,7 @@ package system import ( "testing" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/unittest" "github.com/stretchr/testify/assert" @@ -40,25 +41,25 @@ func TestAppStateDB(t *testing.T) { as := &DBStore{} item1 := new(testItem1) - assert.NoError(t, as.Get(item1)) + assert.NoError(t, as.Get(db.DefaultContext, item1)) assert.Equal(t, "", item1.Val1) assert.EqualValues(t, 0, item1.Val2) item1 = new(testItem1) item1.Val1 = "a" item1.Val2 = 2 - assert.NoError(t, as.Set(item1)) + assert.NoError(t, as.Set(db.DefaultContext, item1)) item2 := new(testItem2) item2.K = "V" - assert.NoError(t, as.Set(item2)) + assert.NoError(t, as.Set(db.DefaultContext, item2)) item1 = new(testItem1) - assert.NoError(t, as.Get(item1)) + assert.NoError(t, as.Get(db.DefaultContext, item1)) assert.Equal(t, "a", item1.Val1) assert.EqualValues(t, 2, item1.Val2) item2 = new(testItem2) - assert.NoError(t, as.Get(item2)) + assert.NoError(t, as.Get(db.DefaultContext, item2)) assert.Equal(t, "V", item2.K) } |