genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0

[TASK] add more product to testdata

This commit is contained in:
Martin Geno 2017-05-07 15:38:08 +02:00
parent cb7396061c
commit 0e068f1c4c
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
6 changed files with 18 additions and 3 deletions

View File

@ -86,7 +86,7 @@ func TestGetGoodAvailable(t *testing.T) {
Comment: "blub", Comment: "blub",
}) })
result, w = session.JSONRequest("GET", "/api/good/availablity/4", nil) result, w = session.JSONRequest("GET", "/api/good/availablity/7", nil)
assertion.Equal(http.StatusNotFound, w.StatusCode) assertion.Equal(http.StatusNotFound, w.StatusCode)
test.CloseServer() test.CloseServer()

View File

@ -33,7 +33,7 @@ func TestAddGood(t *testing.T) {
_, w = session.JSONRequest("POST", "/api/good/a", good) _, w = session.JSONRequest("POST", "/api/good/a", good)
assertion.Equal(http.StatusNotAcceptable, w.StatusCode) assertion.Equal(http.StatusNotAcceptable, w.StatusCode)
_, w = session.JSONRequest("POST", "/api/good/4", good) _, w = session.JSONRequest("POST", "/api/good/7", good)
assertion.Equal(http.StatusNotFound, w.StatusCode) assertion.Equal(http.StatusNotFound, w.StatusCode)
_, w = session.JSONRequest("POST", "/api/good/1", good) _, w = session.JSONRequest("POST", "/api/good/1", good)

View File

@ -0,0 +1,4 @@
{
"id": 4,
"title": "Blueberry"
}

View File

@ -0,0 +1,4 @@
{
"id": 5,
"title": "Kaki"
}

View File

@ -0,0 +1,4 @@
{
"id": 6,
"title": "Kiwi"
}

View File

@ -1,5 +1,8 @@
[ [
{"id":1, "title": "Apple"}, {"id":1, "title": "Apple"},
{"id":2, "title": "Pear"}, {"id":2, "title": "Pear"},
{"id":3, "title": "Strawberry"} {"id":3, "title": "Strawberry"},
{"id":4, "title": "Blueberry"},
{"id":5, "title": "Kaki"},
{"id":6, "title": "Kiwi"}
] ]