From 726045c0762869c1e3d87e2e014fb8bb412682ba Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 20:51:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=85=20Add=20status=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-tests/status_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 api-tests/status_test.go diff --git a/api-tests/status_test.go b/api-tests/status_test.go new file mode 100644 index 0000000..7f1cf5f --- /dev/null +++ b/api-tests/status_test.go @@ -0,0 +1,17 @@ +package api_tests + +import ( + "fmt" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestStatus(t *testing.T) { + s := assert.New(t) + for i := 100; i <= 599; i++ { + resp, _ := ExecRequest(R{ + Path: fmt.Sprintf("status/%d", i), + }) + s.Equal(i, resp.StatusCode) + } +} From 1f34eea8f31ca3f268ed525d16cc514744f2a8a4 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 21:24:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=AA=20200~599?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-tests/status_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-tests/status_test.go b/api-tests/status_test.go index 7f1cf5f..800325e 100644 --- a/api-tests/status_test.go +++ b/api-tests/status_test.go @@ -8,7 +8,7 @@ import ( func TestStatus(t *testing.T) { s := assert.New(t) - for i := 100; i <= 599; i++ { + for i := 200; i <= 599; i++ { resp, _ := ExecRequest(R{ Path: fmt.Sprintf("status/%d", i), })