mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-03 16:58:47 +00:00
Update go-github library
This commit is contained in:
26
vendor/github.com/google/go-github/github/activity_notifications_test.go
generated
vendored
26
vendor/github.com/google/go-github/github/activity_notifications_test.go
generated
vendored
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func TestActivityService_ListNotification(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/notifications", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -34,8 +34,8 @@ func TestActivityService_ListNotification(t *testing.T) {
|
||||
opt := &NotificationListOptions{
|
||||
All: true,
|
||||
Participating: true,
|
||||
Since: time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC),
|
||||
Before: time.Date(2007, 03, 04, 15, 04, 05, 0, time.UTC),
|
||||
Since: time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC),
|
||||
Before: time.Date(2007, time.March, 04, 15, 04, 05, 0, time.UTC),
|
||||
}
|
||||
notifications, _, err := client.Activity.ListNotifications(context.Background(), opt)
|
||||
if err != nil {
|
||||
@@ -49,7 +49,7 @@ func TestActivityService_ListNotification(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActivityService_ListRepositoryNotification(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/notifications", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -69,7 +69,7 @@ func TestActivityService_ListRepositoryNotification(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActivityService_MarkNotificationsRead(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/notifications", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -80,14 +80,14 @@ func TestActivityService_MarkNotificationsRead(t *testing.T) {
|
||||
w.WriteHeader(http.StatusResetContent)
|
||||
})
|
||||
|
||||
_, err := client.Activity.MarkNotificationsRead(context.Background(), time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC))
|
||||
_, err := client.Activity.MarkNotificationsRead(context.Background(), time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
|
||||
if err != nil {
|
||||
t.Errorf("Activity.MarkNotificationsRead returned error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestActivityService_MarkRepositoryNotificationsRead(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/notifications", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -98,14 +98,14 @@ func TestActivityService_MarkRepositoryNotificationsRead(t *testing.T) {
|
||||
w.WriteHeader(http.StatusResetContent)
|
||||
})
|
||||
|
||||
_, err := client.Activity.MarkRepositoryNotificationsRead(context.Background(), "o", "r", time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC))
|
||||
_, err := client.Activity.MarkRepositoryNotificationsRead(context.Background(), "o", "r", time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
|
||||
if err != nil {
|
||||
t.Errorf("Activity.MarkRepositoryNotificationsRead returned error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestActivityService_GetThread(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/notifications/threads/1", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -125,7 +125,7 @@ func TestActivityService_GetThread(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActivityService_MarkThreadRead(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/notifications/threads/1", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -140,7 +140,7 @@ func TestActivityService_MarkThreadRead(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActivityService_GetThreadSubscription(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/notifications/threads/1/subscription", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -160,7 +160,7 @@ func TestActivityService_GetThreadSubscription(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActivityService_SetThreadSubscription(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
input := &Subscription{Subscribed: Bool(true)}
|
||||
@@ -189,7 +189,7 @@ func TestActivityService_SetThreadSubscription(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActivityService_DeleteThreadSubscription(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/notifications/threads/1/subscription", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user