Files
eatvio_app/test/core/const_test.dart

58 lines
1.6 KiB
Dart

import 'package:eatvio_app/core/const.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('Global constants', () {
test('hidePlans is defined', () {
expect(hidePlans, isA<bool>());
});
test('buildDate is defined', () {
expect(buildDate, isA<String>());
});
test('durationValues contains correct values', () {
expect(durationValues, [7, 14, 21]);
expect(durationValues.length, 3);
});
test('dietTypeValues contains correct values', () {
expect(dietTypeValues, ['veg', 'light', 'carb', 'meat']);
expect(dietTypeValues.length, 4);
});
test('planTypeValues contains correct values', () {
expect(planTypeValues, ['fit', 'slim', 'wellness', 'behavior']);
expect(planTypeValues.length, 4);
});
test('newMessagesChannelName is defined', () {
expect(newMessagesChannelName, 'private-new-chat-messages');
});
test('newNotificationsChannelName is defined', () {
expect(newNotificationsChannelName, 'private-message-events');
});
test('directChatChannelName is defined', () {
expect(directChatChannelName, 'private-direct-chat');
});
test('thresholdForPagination is defined', () {
expect(thresholdForPagination, 150);
});
test('durationValues are immutable', () {
expect(() => durationValues.add(30), throwsUnsupportedError);
});
test('dietTypeValues are immutable', () {
expect(() => dietTypeValues.add('test'), throwsUnsupportedError);
});
test('planTypeValues are immutable', () {
expect(() => planTypeValues.add('test'), throwsUnsupportedError);
});
});
}