This commit is contained in:
2026-10-16 01:25:50 +05:30
commit c60ea2d370
89 changed files with 4661 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:kickkings_support/models/support_message.dart';
void main() {
test('rejects an empty reply', () {
expect(validateReplyBody(' '), 'Enter a message.');
});
test('accepts a trimmed reply up to 4000 characters', () {
expect(validateReplyBody(' hello '), isNull);
expect(validateReplyBody('a' * maxReplyLength), isNull);
});
test('rejects a reply over 4000 characters', () {
expect(
validateReplyBody('a' * (maxReplyLength + 1)),
'Message must be 4000 characters or fewer.',
);
});
}