Skip to content

Commit 0f2b571

Browse files
committed
add TEST
1 parent db2dca8 commit 0f2b571

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

integrations/api_notification_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ func TestAPINotification(t *testing.T) {
8181
assert.EqualValues(t, thread5.Issue.APIURL(), apiN.Subject.URL)
8282
assert.EqualValues(t, thread5.Repository.HTMLURL(), apiN.Repository.HTMLURL)
8383

84+
// -- check notifications --
85+
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/notifications/new?token=%s", token))
86+
resp = session.MakeRequest(t, req, http.StatusFound)
87+
8488
// -- mark notifications as read --
8589
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/notifications?token=%s", token))
8690
resp = session.MakeRequest(t, req, http.StatusOK)
@@ -103,4 +107,8 @@ func TestAPINotification(t *testing.T) {
103107
assert.Equal(t, models.NotificationStatusUnread, thread5.Status)
104108
thread5 = models.AssertExistsAndLoadBean(t, &models.Notification{ID: 5}).(*models.Notification)
105109
assert.Equal(t, models.NotificationStatusRead, thread5.Status)
110+
111+
// -- check notifications --
112+
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/notifications/new?token=%s", token))
113+
resp = session.MakeRequest(t, req, http.StatusNoContent)
106114
}

0 commit comments

Comments
 (0)