diff --git a/http/good_show_test.go b/http/good_show_test.go index d5ed3ba..e359022 100644 --- a/http/good_show_test.go +++ b/http/good_show_test.go @@ -86,7 +86,7 @@ func TestGetGoodAvailable(t *testing.T) { 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) test.CloseServer() diff --git a/http/good_test.go b/http/good_test.go index ef22a82..36987e2 100644 --- a/http/good_test.go +++ b/http/good_test.go @@ -33,7 +33,7 @@ func TestAddGood(t *testing.T) { _, w = session.JSONRequest("POST", "/api/good/a", good) 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) _, w = session.JSONRequest("POST", "/api/good/1", good) diff --git a/webroot/api-test/product/4/index.html b/webroot/api-test/product/4/index.html new file mode 100644 index 0000000..02c6eeb --- /dev/null +++ b/webroot/api-test/product/4/index.html @@ -0,0 +1,4 @@ +{ + "id": 4, + "title": "Blueberry" +} diff --git a/webroot/api-test/product/5/index.html b/webroot/api-test/product/5/index.html new file mode 100644 index 0000000..fdf023c --- /dev/null +++ b/webroot/api-test/product/5/index.html @@ -0,0 +1,4 @@ +{ + "id": 5, + "title": "Kaki" +} diff --git a/webroot/api-test/product/6/index.html b/webroot/api-test/product/6/index.html new file mode 100644 index 0000000..54ef034 --- /dev/null +++ b/webroot/api-test/product/6/index.html @@ -0,0 +1,4 @@ +{ + "id": 6, + "title": "Kiwi" +} diff --git a/webroot/api-test/product/index.html b/webroot/api-test/product/index.html index 179bce3..44d3e12 100644 --- a/webroot/api-test/product/index.html +++ b/webroot/api-test/product/index.html @@ -1,5 +1,8 @@ [ {"id":1, "title": "Apple"}, {"id":2, "title": "Pear"}, - {"id":3, "title": "Strawberry"} + {"id":3, "title": "Strawberry"}, + {"id":4, "title": "Blueberry"}, + {"id":5, "title": "Kaki"}, + {"id":6, "title": "Kiwi"} ]