Adds error store tests
This commit is contained in:
parent
e420bf303a
commit
b9cea2347c
@ -82,3 +82,25 @@ func TestErrorUserMethods(t *testing.T) {
|
|||||||
_, err = str.SelectUserByUsername("snth")
|
_, err = str.SelectUserByUsername("snth")
|
||||||
assert.NotNil(err)
|
assert.NotNil(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestErrorCurrentPlanMethods(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
str := store.GetErrorStore("error", true)
|
||||||
|
str2 := store.GetErrorStore("error", false)
|
||||||
|
|
||||||
|
cp := &models.CurrentPlan{}
|
||||||
|
|
||||||
|
_, err := str.SelectCurrentPlan(1)
|
||||||
|
assert.NotNil(err)
|
||||||
|
|
||||||
|
err = str.InsertCurrentPlan(cp, 1)
|
||||||
|
assert.NotNil(err)
|
||||||
|
err = str2.InsertCurrentPlan(cp, 1)
|
||||||
|
assert.Nil(err)
|
||||||
|
|
||||||
|
replace := &models.CurrentPlan{}
|
||||||
|
err = str.UpdateCurrentPlan(replace, 1)
|
||||||
|
assert.NotNil(err)
|
||||||
|
err = str2.UpdateCurrentPlan(replace, 1)
|
||||||
|
assert.Nil(err)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user