File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ limitations under the License.
20
20
package main
21
21
22
22
import (
23
+ "reflect"
23
24
"testing"
24
25
25
26
. "github.com/onsi/gomega"
@@ -65,3 +66,42 @@ func Test_buildSetOfPRNumbers(t *testing.T) {
65
66
})
66
67
}
67
68
}
69
+
70
+ func Test_githubFromToPRLister_listPRs (t * testing.T ) {
71
+ type fields struct {
72
+ client * githubClient
73
+ fromRef ref
74
+ toRef ref
75
+ branch string
76
+ }
77
+ type args struct {
78
+ previousReleaseRef ref
79
+ }
80
+ tests := []struct {
81
+ name string
82
+ fields fields
83
+ args args
84
+ want []pr
85
+ wantErr bool
86
+ }{
87
+ // TODO: Add test cases.
88
+ }
89
+ for _ , tt := range tests {
90
+ t .Run (tt .name , func (t * testing.T ) {
91
+ l := & githubFromToPRLister {
92
+ client : tt .fields .client ,
93
+ fromRef : tt .fields .fromRef ,
94
+ toRef : tt .fields .toRef ,
95
+ branch : tt .fields .branch ,
96
+ }
97
+ got , err := l .listPRs (tt .args .previousReleaseRef )
98
+ if (err != nil ) != tt .wantErr {
99
+ t .Errorf ("githubFromToPRLister.listPRs() error = %v, wantErr %v" , err , tt .wantErr )
100
+ return
101
+ }
102
+ if ! reflect .DeepEqual (got , tt .want ) {
103
+ t .Errorf ("githubFromToPRLister.listPRs() = %v, want %v" , got , tt .want )
104
+ }
105
+ })
106
+ }
107
+ }
You can’t perform that action at this time.
0 commit comments