Skip to content

Commit f347be7

Browse files
removed commented code
1 parent b42bcbc commit f347be7

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

pkg/api/handlers/handlers.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ func ProcessTags(db *gorm.DB, testRun *models.TestRun) error {
136136
return nil
137137
}
138138

139-
//func (h *Handler) GetTestRunAll(c *gin.Context) {
140-
// var testRuns []models.TestRun
141-
// h.db.Find(&testRuns)
142-
// c.JSON(http.StatusOK, testRuns)
143-
//}
144-
145139
func (h *Handler) GetTestRunAll(c *gin.Context) {
146140

147141
var testRuns []models.TestRun

pkg/api/handlers/handlers_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,6 @@ var _ = Describe("Handlers", func() {
167167
WithArgs(201).
168168
WillReturnRows(specRunRows)
169169

170-
//tagJoinRows := sqlmock.NewRows([]string{"spec_run_id", "tag_id"}).
171-
// AddRow(301, 401)
172-
//
173-
//mock.ExpectQuery(regexp.QuoteMeta(`SELECT * FROM "spec_run_tags" WHERE "spec_run_tags"."spec_run_id" = $1`)).
174-
// WithArgs(301).
175-
// WillReturnRows(tagJoinRows)
176-
//
177-
//tagRows := sqlmock.NewRows([]string{"id", "name"}).
178-
// AddRow(401, "tag-1")
179-
180-
//mock.ExpectQuery(regexp.QuoteMeta(`SELECT * FROM "tags" WHERE "tags"."id" = $1`)).
181-
// WithArgs(401).
182-
// WillReturnRows(tagRows)
183-
184170
w := httptest.NewRecorder()
185171
c, _ := gin.CreateTestContext(w)
186172
c.Request, _ = http.NewRequest("GET", "/testruns?fields=project,suiteruns", nil)
@@ -194,7 +180,6 @@ var _ = Describe("Handlers", func() {
194180
Expect(len(testRuns)).To(Equal(1))
195181
Expect(testRuns[0].Project.Name).To(Equal("project-name"))
196182
Expect(testRuns[0].SuiteRuns[0].SuiteName).To(Equal("suite-1"))
197-
//Expect(testRuns[0].SuiteRuns[0].SpecRuns[0].SpecDescription).To(Equal("spec-1"))
198183
})
199184
})
200185

0 commit comments

Comments
 (0)