From a58b4ff2d636daa6f096caa269510db997465085 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 23 Mar 2018 12:13:38 +0100 Subject: [PATCH] remove api tests --- pkg/api/annotations_test.go | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/pkg/api/annotations_test.go b/pkg/api/annotations_test.go index 8e09b4a41a6..7c298550673 100644 --- a/pkg/api/annotations_test.go +++ b/pkg/api/annotations_test.go @@ -14,11 +14,10 @@ import ( func TestAnnotationsApiEndpoint(t *testing.T) { Convey("Given an annotation without a dashboard id", t, func() { cmd := dtos.PostAnnotationsCmd{ - DashboardId: 1, - Time: 1000, - Text: "annotation text", - Tags: []string{"tag1", "tag2"}, - IsRegion: false, + Time: 1000, + Text: "annotation text", + Tags: []string{"tag1", "tag2"}, + IsRegion: false, } updateCmd := dtos.UpdateAnnotationsCmd{ @@ -80,26 +79,6 @@ func TestAnnotationsApiEndpoint(t *testing.T) { So(sc.resp.Code, ShouldEqual, 200) }) }) - - Convey("Should note be able to save an annotation", func() { - cmd = dtos.PostAnnotationsCmd{ - Time: 1000, - Text: "annotation text", - } - postAnnotationScenario("When calling POST without dashboardId", "/api/annotations", "/api/annotations", role, cmd, func(sc *scenarioContext) { - sc.fakeReqWithParams("POST", sc.url, map[string]string{}).exec() - So(sc.resp.Code, ShouldEqual, 500) - }) - - cmd = dtos.PostAnnotationsCmd{ - Time: 1000, - DashboardId: 3, - } - postAnnotationScenario("When calling POST without text", "/api/annotations", "/api/annotations", role, cmd, func(sc *scenarioContext) { - sc.fakeReqWithParams("POST", sc.url, map[string]string{}).exec() - So(sc.resp.Code, ShouldEqual, 500) - }) - }) }) })