Skip to content

Commit faaaa0c

Browse files
Merge branch 'master' of https://github.com/sayalideshmukh10/go-github into test_case_scim
2 parents 4d4f633 + 3cb9c66 commit faaaa0c

4 files changed

Lines changed: 58 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
contents: read # for actions/checkout to fetch code
2121
strategy:
2222
matrix:
23-
go-version: [1.x, 1.17.x]
23+
go-version: [1.x, 1.18.x]
2424
platform: [ubuntu-latest]
2525
include:
2626
# include windows, but only with the latest Go version, since there

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ GitHub Apps authentication can be provided by the [ghinstallation](https://githu
123123
package.
124124

125125
> **Note**: Most endpoints (ex. [`GET /rate_limit`]) require access token authentication
126-
> while a few others (ex. [`GET /app/hook/deliverires`]) require [JWT] authentication.
126+
> while a few others (ex. [`GET /app/hook/deliveries`]) require [JWT] authentication.
127127
128128
[`GET /rate_limit`]: https://docs.github.com/en/rest/rate-limit#get-rate-limit-status-for-the-authenticated-user
129-
[`GET /app/hook/deliverires`]: https://docs.github.com/en/rest/apps/webhooks#list-deliveries-for-an-app-webhook
129+
[`GET /app/hook/deliveries`]: https://docs.github.com/en/rest/apps/webhooks#list-deliveries-for-an-app-webhook
130130
[JWT]: https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app
131131

132132

github/scim_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,22 @@ func TestListSCIMProvisionedIdentitiesOptions_Marshal(t *testing.T) {
445445

446446
testJSONMarshal(t, u, want)
447447
}
448+
449+
func TestSCIMUserName_Marshal(t *testing.T) {
450+
testJSONMarshal(t, &SCIMUserName{}, `{
451+
"givenName":"","familyName":""
452+
}`)
453+
454+
u := &SCIMUserName{
455+
GivenName: "Name1",
456+
FamilyName: "Fname",
457+
Formatted: String("formatted name"),
458+
}
459+
460+
want := `{
461+
"givenName": "Name1",
462+
"familyName": "Fname",
463+
"formatted": "formatted name"
464+
}`
465+
testJSONMarshal(t, u, want)
466+
}

github/teams_test.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,3 +2098,39 @@ func TestTeamsService_RemoveConnectedExternalGroup_notFound(t *testing.T) {
20982098
t.Errorf("Teams.GetExternalGroup returned status %d, want %d", got, want)
20992099
}
21002100
}
2101+
2102+
func TestIDPGroupList_Marshal(t *testing.T) {
2103+
testJSONMarshal(t, &IDPGroupList{}, "{}")
2104+
2105+
u := &IDPGroupList{
2106+
Groups: []*IDPGroup{
2107+
{
2108+
GroupID: String("abc1"),
2109+
GroupName: String("test group"),
2110+
GroupDescription: String("test group descripation"),
2111+
},
2112+
{
2113+
GroupID: String("abc2"),
2114+
GroupName: String("test group2"),
2115+
GroupDescription: String("test group descripation2"),
2116+
},
2117+
},
2118+
}
2119+
2120+
want := `{
2121+
"groups": [
2122+
{
2123+
"group_id": "abc1",
2124+
"group_name": "test group",
2125+
"group_description": "test group descripation"
2126+
},
2127+
{
2128+
"group_id": "abc2",
2129+
"group_name": "test group2",
2130+
"group_description": "test group descripation2"
2131+
}
2132+
]
2133+
}`
2134+
2135+
testJSONMarshal(t, u, want)
2136+
}

0 commit comments

Comments
 (0)