File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,17 @@ describe("githubService", function () {
141
141
142
142
describe ( "fetchOpenIssues with search query param" , function ( ) {
143
143
it ( "Should generate the correct url to fetch open issues with search param" , async function ( ) {
144
+ const searchString = "website" ;
144
145
const response = await githubService . fetchOpenIssues ( {
145
- searchString : "website" ,
146
+ searchString,
146
147
} ) ;
147
- expect ( response ) . to . be . equal (
148
- "https://api.github.com/search/issues?q=website+org%3AReal-Dev-Squad+type%3Aissue+is%3Aopen&sort=created&per_page=100&page=1"
149
- ) ;
148
+
149
+ const baseURL = config . get ( "githubApi.baseUrl" ) ;
150
+ const org = config . get ( "githubApi.org" ) ;
151
+ const path = "search/issues" ;
152
+ const searchParams = `org%3A${ org } +type%3Aissue+is%3Aopen&sort=created&per_page=100&page=1` ;
153
+
154
+ expect ( response ) . to . be . equal ( `${ baseURL } /${ path } ?q=${ searchString } +${ searchParams } ` ) ;
150
155
} ) ;
151
156
} ) ;
152
157
} ) ;
You can’t perform that action at this time.
0 commit comments