28 lines
388 B
Go
Executable File
28 lines
388 B
Go
Executable File
package ajax
|
|
|
|
import (
|
|
"local/todo-server/config"
|
|
"local/todo-server/server/ajax/list"
|
|
"testing"
|
|
)
|
|
|
|
func TestNew(t *testing.T) {
|
|
mockAjax()
|
|
}
|
|
|
|
func mockAjax() *Ajax {
|
|
config.StoreType = "map"
|
|
ajax, err := New()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
list := &list.List{
|
|
Name: "list",
|
|
UUID: "list",
|
|
}
|
|
if err := ajax.storageSetList(list); err != nil {
|
|
panic(err)
|
|
}
|
|
return ajax
|
|
}
|