File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 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()
4545 $ this ->assertTrue ($ validation ->passes ());
4646 }
4747
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+
4869 /** @test */
4970 public function it_checks_if_the_translation_for_a_specific_locale_is_unique ()
5071 {
You can’t perform that action at this time.
0 commit comments