Skip to content

Commit 7371c61

Browse files
authored
✨ Adds Tests for setLocale: (Instabug#17)
1 parent 4e261cb commit 7371c61

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

example/test/main.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ void main() {
2525
return null;
2626
case 'logOut':
2727
return null;
28+
case 'setLocale:':
29+
return null;
2830
default:
2931
return null;
3032
}
@@ -34,7 +36,6 @@ void main() {
3436
tearDown(() async {
3537
log.clear();
3638
});
37-
3839
test('startWithToken:invocationEvents: Test', () async {
3940
InstabugFlutter.start(appToken, invocationEvents);
4041
expect(log, <Matcher>[
@@ -91,4 +92,15 @@ test('startWithToken:invocationEvents: Test', () async {
9192
)
9293
]);
9394
});
95+
96+
test('setLocale:', () async {
97+
InstabugFlutter.setLocale(Locale.German);
98+
expect(log, <Matcher>[
99+
isMethodCall('setLocale:',
100+
arguments: <String, dynamic>{
101+
'locale': Locale.German.toString()
102+
},
103+
)
104+
]);
105+
});
94106
}

0 commit comments

Comments
 (0)