File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 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.
2020package main
2121
2222import (
23+ "reflect"
2324 "testing"
2425
2526 . "github.com/onsi/gomega"
@@ -65,3 +66,42 @@ func Test_buildSetOfPRNumbers(t *testing.T) {
6566 })
6667 }
6768}
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