File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Octokit.GraphQL.IntegrationTests/Queries Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,22 @@ public async Task Can_Use_Conditional_In_BaseRef_Query()
138
138
var query = new Query ( )
139
139
. Repository ( owner : "octokit" , name : "octokit.net" )
140
140
. PullRequest ( number : 1 )
141
- . Select ( pr => pr . BaseRef != null ? pr . BaseRef . Name : null ) ;
141
+ . Select ( pr => new
142
+ {
143
+ BaseRefName = pr . BaseRef != null ? pr . BaseRef . Name : null ,
144
+ BaseRefNotNull = pr . BaseRef != null
145
+ } ) ;
142
146
143
147
var result = await Connection . Run ( query ) ;
144
148
145
- Assert . Equal ( "master" , result ) ;
149
+ if ( result . BaseRefNotNull )
150
+ {
151
+ Assert . Equal ( "main" , result . BaseRefName ) ;
152
+ }
153
+ else
154
+ {
155
+ Assert . Null ( result . BaseRefName ) ;
156
+ }
146
157
}
147
158
148
159
[ IntegrationTest ]
@@ -159,7 +170,7 @@ public async Task Can_Use_Conditional_When_Selecting_Base_Repository_Owner()
159
170
160
171
var result = await Connection . Run ( query ) ;
161
172
162
- if ( result . BaseRefNotNull )
173
+ if ( result . BaseRefNotNull )
163
174
{
164
175
Assert . Equal ( "octokit" , result . Owner ) ;
165
176
}
You can’t perform that action at this time.
0 commit comments