so mamy things...
This commit is contained in:
1 parent
f7a8d416c1
commit
78d50d9a6d
24 files changed
+516
-173
No files matched your search
@@ -18,7 +18,7 @@ func TestCreateDoorman(t *testing.T) {
|
||||
conn = inmemoryconnector.NewInMemoryDBConnector()
|
||||
payload := `
|
||||
{"name":"name",
|
||||
"values":[{"name":"red","probability":0.2},{"name":"blue","probability":0.8}],
|
||||
"values":[{"name":"red","probability":"1/5"},{"name":"blue","probability": "4/5"}],
|
||||
"emails": ["alice"]
|
||||
}`
|
||||
req, err := http.NewRequest(
|
||||
@@ -34,7 +34,7 @@ func TestCreateDoorman(t *testing.T) {
|
||||
w := httptest.NewRecorder()
|
||||
CreateDoorman(w, req)
|
||||
if w.Code != 201 {
|
||||
t.Error("bad status code", w.Code)
|
||||
t.Error("bad status code", w.Code, "\n", w.Body)
|
||||
} else if location := w.Header().Get("location"); location == "" {
|
||||
t.Error("missing location header", location)
|
||||
} else if dor, _ := conn.GetDoorman(GetIdFromLocation(location)); dor == nil {
|
||||
|
||||
Reference in new issue
Block a user