Skip to content

Commit 7c35dac

Browse files
committed
Create json_serialization_helpers_test.dart
1 parent af6f3f9 commit 7c35dac

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:clerk_auth/src/utils/json_serialization_helpers.dart'
2+
as helpers;
3+
import 'package:test/test.dart';
4+
5+
void main() {
6+
group('json_serialization_helpers', () {
7+
test('isOn returns true for \'required\'', () {
8+
expect(helpers.isOn('required'), isTrue);
9+
});
10+
11+
test('isOn returns true for \'on\'', () {
12+
expect(helpers.isOn('on'), isTrue);
13+
});
14+
15+
test('isOn returns false for \'off\'', () {
16+
expect(helpers.isOn('off'), isFalse);
17+
});
18+
19+
test('isOn returns false for null', () {
20+
expect(helpers.isOn(null), isFalse);
21+
});
22+
});
23+
}

0 commit comments

Comments
 (0)