mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-03 08:18:31 +00:00
Update go-github library
This commit is contained in:
20
vendor/github.com/google/go-github/github/issues_assignees_test.go
generated
vendored
20
vendor/github.com/google/go-github/github/issues_assignees_test.go
generated
vendored
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIssuesService_ListAssignees(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/assignees", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -30,19 +30,22 @@ func TestIssuesService_ListAssignees(t *testing.T) {
|
||||
t.Errorf("Issues.ListAssignees returned error: %v", err)
|
||||
}
|
||||
|
||||
want := []*User{{ID: Int(1)}}
|
||||
want := []*User{{ID: Int64(1)}}
|
||||
if !reflect.DeepEqual(assignees, want) {
|
||||
t.Errorf("Issues.ListAssignees returned %+v, want %+v", assignees, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIssuesService_ListAssignees_invalidOwner(t *testing.T) {
|
||||
client, _, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
_, _, err := client.Issues.ListAssignees(context.Background(), "%", "r", nil)
|
||||
testURLParseError(t, err)
|
||||
}
|
||||
|
||||
func TestIssuesService_IsAssignee_true(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -59,7 +62,7 @@ func TestIssuesService_IsAssignee_true(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIssuesService_IsAssignee_false(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -77,7 +80,7 @@ func TestIssuesService_IsAssignee_false(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIssuesService_IsAssignee_error(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -95,12 +98,15 @@ func TestIssuesService_IsAssignee_error(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIssuesService_IsAssignee_invalidOwner(t *testing.T) {
|
||||
client, _, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
_, _, err := client.Issues.IsAssignee(context.Background(), "%", "r", "u")
|
||||
testURLParseError(t, err)
|
||||
}
|
||||
|
||||
func TestIssuesService_AddAssignees(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/issues/1/assignees", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -129,7 +135,7 @@ func TestIssuesService_AddAssignees(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIssuesService_RemoveAssignees(t *testing.T) {
|
||||
setup()
|
||||
client, mux, _, teardown := setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/repos/o/r/issues/1/assignees", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user