File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,27 @@ public function it_checks_if_the_translation_for_the_current_locale_is_unique()
45
45
$ this ->assertTrue ($ validation ->passes ());
46
46
}
47
47
48
+ /** @test */
49
+ public function search_is_case_insensitive ()
50
+ {
51
+ Model::create ([
52
+ 'slug ' => ['en ' => 'existing-slug-en ' , 'nl ' => 'existing-slug-nl ' ],
53
+ 'name ' => ['en ' => 'existing-name-en ' , 'nl ' => 'existing-name-nl ' ],
54
+ ]);
55
+
56
+ $ rules = [
57
+ 'slug ' => "{$ this ->rule }: {$ this ->table }" ,
58
+ 'name ' => UniqueTranslationRule::for ($ this ->table ),
59
+ ];
60
+
61
+ $ validation = Validator::make ([
62
+ 'slug ' => 'Existing-slug-en ' ,
63
+ 'name ' => 'Existing-name-en ' ,
64
+ ], $ rules );
65
+
66
+ $ this ->assertTrue ($ validation ->fails ());
67
+ }
68
+
48
69
/** @test */
49
70
public function it_checks_if_the_translation_for_a_specific_locale_is_unique ()
50
71
{
You can’t perform that action at this time.
0 commit comments