From 8af53ba76fbd06856339774170562cd44cd0e339 Mon Sep 17 00:00:00 2001 From: Nabeel Parkar Date: Sat, 1 Jun 2024 16:24:05 +0530 Subject: [PATCH] fix: tests for email and emoji validations (#69) --- .../validations/strings/string_email_validation_test.dart | 2 +- .../validations/strings/string_emoji_validation_test.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/luthor/test/validations/strings/string_email_validation_test.dart b/packages/luthor/test/validations/strings/string_email_validation_test.dart index 36cf41c3..a773b214 100644 --- a/packages/luthor/test/validations/strings/string_email_validation_test.dart +++ b/packages/luthor/test/validations/strings/string_email_validation_test.dart @@ -14,7 +14,7 @@ void main() { }); test('should return false when value is not a valid email', () { - final result = l.string().email().validateValue('user'); + final result = l.string().email().validateValue('hello user@example.com'); switch (result) { case SingleValidationSuccess(data: _): diff --git a/packages/luthor/test/validations/strings/string_emoji_validation_test.dart b/packages/luthor/test/validations/strings/string_emoji_validation_test.dart index da468df2..a78b6053 100644 --- a/packages/luthor/test/validations/strings/string_emoji_validation_test.dart +++ b/packages/luthor/test/validations/strings/string_emoji_validation_test.dart @@ -3,11 +3,11 @@ import 'package:test/test.dart'; void main() { test('should return true when value is a valid emoji', () { - final result = l.string().emoji().validateValue('👍'); + final result = l.string().emoji().validateValue('👍👍👍'); switch (result) { case SingleValidationSuccess(data: _): - expect(result.data, '👍'); + expect(result.data, '👍👍👍'); case SingleValidationError(data: _, errors: _): fail('should not have errors'); }