Skip to content

Commit

Permalink
Fix search tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexer10 committed Apr 13, 2022
1 parent e231b59 commit c900b72
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/search_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,26 @@ void main() {
expect(nextPage, isNull);
});

test('Search only videos', () async {
var videos =
await yt!.search.searchContent('Banana', filter: TypeFilters.video);
expect(videos, everyElement(isA<SearchVideo>()));
});

test('Search only channels', () async {
var channels = await yt!.search
.searchContent('PewDiePie', filter: TypeFilters.channel);
expect(channels.every((e) => e is SearchChannel), isTrue);
expect(channels, everyElement(isA<SearchChannel>()));

});

test('Search only playlists', () async {
var channels =
var playlists =
await yt!.search.searchContent('Banana', filter: TypeFilters.playlist);
expect(channels.every((e) => e is SearchPlaylist), isTrue);
expect(playlists, everyElement(isA<SearchPlaylist>()));
});

test('Search only movies', () async {
var channels =
await yt!.search.searchContent('Banana', filter: TypeFilters.playlist);
expect(channels.every((e) => e is SearchPlaylist), isTrue);
});


test('Search test search filters', () async {
var featureSearch =
Expand Down

0 comments on commit c900b72

Please sign in to comment.