Unittesting begins
This commit is contained in:
20
server/ajax/ajax_test.go
Normal file
20
server/ajax/ajax_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package ajax
|
||||
|
||||
import (
|
||||
"local/todo-server/config"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
mockAjax()
|
||||
}
|
||||
|
||||
func mockAjax() *Ajax {
|
||||
config.StoreType = "map"
|
||||
ajax, err := New()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
ajax.storageSetCur("list")
|
||||
return ajax
|
||||
}
|
||||
Reference in New Issue
Block a user