Skip to content

Commit 393af95

Browse files
committed
test(auth): align GitHub user info test names and org-forbidden assertion
- rename two Convey blocks so names match the mocked failing API call - assert org-forbidden case does not include "MyOrg" (real org group) instead of "testOrg" Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
1 parent 76570d1 commit 393af95

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/api/controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13055,7 +13055,7 @@ func TestGetGithubUserInfo(t *testing.T) {
1305513055
So(groups, ShouldContain, "myorg/platform")
1305613056
})
1305713057

13058-
Convey("github ListOrgs internal server error", t, func() {
13058+
Convey("github ListEmails internal server error", t, func() {
1305913059
mockedHTTPClient := mock.NewMockedHTTPClient(
1306013060
mock.WithRequestMatchHandler(
1306113061
mock.GetUserEmails,
@@ -13113,11 +13113,11 @@ func TestGetGithubUserInfo(t *testing.T) {
1311313113
email, groups, err := api.GetGithubUserInfo(context.Background(), client, log.NewTestLogger())
1311413114
So(err, ShouldBeNil)
1311513115
So(email, ShouldEqual, "test@test")
13116-
So(groups, ShouldNotContain, "testOrg")
13116+
So(groups, ShouldNotContain, "MyOrg")
1311713117
So(groups, ShouldContain, "myorg/infra")
1311813118
})
1311913119

13120-
Convey("github ListEmails error", t, func() {
13120+
Convey("github ListOrgs internal server error", t, func() {
1312113121
mockedHTTPClient := mock.NewMockedHTTPClient(
1312213122
mock.WithRequestMatch(
1312313123
mock.GetUserEmails,

0 commit comments

Comments
 (0)