init
This commit is contained in:
@@ -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.',
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user