File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Octokit.GraphQL.IntegrationTests/Queries Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -151,11 +151,22 @@ public async Task Can_Use_Conditional_When_Selecting_Base_Repository_Owner()
151
151
var query = new Query ( )
152
152
. Repository ( owner : "octokit" , name : "octokit.net" )
153
153
. PullRequest ( number : 1 )
154
- . Select ( pr => pr . BaseRef != null ? pr . BaseRef . Repository . Owner . Login : null ) ;
154
+ . Select ( pr => new
155
+ {
156
+ Owner = pr . BaseRef != null ? pr . BaseRef . Repository . Owner . Login : null ,
157
+ BaseRefNotNull = pr . BaseRef != null
158
+ } ) ;
155
159
156
160
var result = await Connection . Run ( query ) ;
157
161
158
- Assert . Equal ( "octokit" , result ) ;
162
+ if ( result . BaseRefNotNull )
163
+ {
164
+ Assert . Equal ( "octokit" , result . Owner ) ;
165
+ }
166
+ else
167
+ {
168
+ Assert . Null ( result . Owner ) ;
169
+ }
159
170
}
160
171
161
172
[ IntegrationTest ]
You can’t perform that action at this time.
0 commit comments