major refactoring of the api
This commit is contained in:
1 parent
d4f7dc57fc
commit
f0628e4682
38 files changed
+821
-367
No files matched your search
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user