INNER CODE UNIT · Go
TestGithubClient_GetDiff
zopdev/helm-charts · charts-lint/github/client_test.go:14
func TestGithubClient_GetDiff(t *testing.T) {
controller := gomock.NewController(t)
mockPullRequest := NewMockPullRequest(controller)
c := New(mockPullRequest)
testcases := []struct {
name string
expect func()
expectedOutput []string
expectErr error
}{
{
name: "success",
expect: func() {
t.Setenv("REPOSITORY_OWNER", "test")
t.Setenv("REPOSITORY_NAME", "test/test")
t.Setenv("PR_NUMBER", "1")