Adds error store test for missing store
This commit is contained in:
parent
42d808165b
commit
f84c9b6ea2
@ -1,6 +1,7 @@
|
||||
package store_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitea.deepak.science/deepak/gogmagog/models"
|
||||
"gitea.deepak.science/deepak/gogmagog/store"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@ -11,11 +12,14 @@ func TestErrorActionMethods(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
str := store.GetErrorStore("error message sample", true)
|
||||
str2 := store.GetErrorStore("error message sample", false)
|
||||
str3 := store.GetErrorStoreForError(fmt.Errorf("test error"), false)
|
||||
|
||||
_, err := str.InsertAction(&models.Action{})
|
||||
assert.NotNil(err)
|
||||
_, err = str2.InsertAction(&models.Action{})
|
||||
assert.Nil(err)
|
||||
_, err = str3.InsertAction(&models.Action{})
|
||||
assert.Nil(err)
|
||||
|
||||
_, err = str.SelectActionByID(8)
|
||||
assert.NotNil(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user