Skip to content

Commit

Permalink
fixes test
Browse files Browse the repository at this point in the history
  • Loading branch information
hayribakici authored and rinukkusu committed Apr 8, 2023
1 parent ef9e670 commit 11ef149
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/spotify_mock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,7 @@ class MockClient implements oauth2.Client {
var regex = RegExp(regexString);
var urlString = url.toString();
var partialPath = regex.firstMatch(urlString)!.group(1);
var file;
if (url.hasQuery &&
(url.queryParameters.containsKey('offset') ||
url.queryParameters.containsKey('after'))) {
var next = url.queryParameters['offset'] ?? url.queryParameters['after'];
file = File('test/data/${partialPath}_$next.json');
} else {
file = File('test/data/$partialPath.json');
}

var file = File('test/data/$partialPath.json');
return file.readAsStringSync();
}

Expand Down

0 comments on commit 11ef149

Please sign in to comment.