Skip to content

Commit 087a5e3

Browse files
committed
Change: tests.
1 parent 5fd5ce3 commit 087a5e3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/vkontakte_test.dart

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
import 'package:dotenv/dotenv.dart';
22
import 'package:shouldly/shouldly.dart';
33
import 'package:test/test.dart';
4-
import 'package:vkdart/vkdart.dart';
54
import 'package:vkdart/vkontakte.dart';
65

76
void main() {
87
final env = DotEnv(includePlatformEnvironment: true)..load();
9-
final vkdart = VkDart(env['TOKEN']!, groupId: int.parse(env['GROUP_ID']!));
8+
final vkontakte = Vkontakte(
9+
token: env['TOKEN']!,
10+
language: LangApi.ru,
11+
version: '5.131',
12+
);
1013

1114
group('Testing methods VK', () {
1215
group('check `request` function', () {
1316
test('should produce a positive result', () async {
14-
final users = await vkdart.request('users.get', {'user_id': 'durov'});
17+
final users =
18+
await vkontakte.request('users.get', {'user_id': 'durov'});
1519

1620
users.should.beOfType<List<dynamic>>();
1721
});
1822

1923
test('should display an error', () async {
2024
await Should.throwAsync<ApiException>(
21-
() => vkdart.request('users.report', {}));
25+
() => vkontakte.request('users.report', {}));
2226
});
2327
});
2428
});

0 commit comments

Comments
 (0)