major refactoring of the api

This commit is contained in:
didier amyot committed 2015-03-28 20:53:28 -07:00
1 parent d4f7dc57fc
commit f0628e4682
38 files changed
+821 -367

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package api
import (
"testing"
"github.com/didiercrunch/doormanserver/doormen"
"github.com/didiercrunch/doormanserver/inmemoryconnector"
)
func TestCreateDoormanInDatabase(t *testing.T) {
wab := doormen.NewDoormanDefinition("some_name")
conn = inmemoryconnector.NewInMemoryDBConnector()
if err := CreateDoormanInDatabase(wab); err != nil {
t.Error(err)
}
if err := CreateDoormanInDatabase(wab); err == nil {
t.Error("should have an error here")
}
}