Skip to content

A free open source IT asset/license management system

Add site name validation test

Marcus Moore714fce7e5999
diff --git a/tests/Feature/Settings/BrandingSettingsTest.php b/tests/Feature/Settings/BrandingSettingsTest.php
new file mode 100644
index 0000000000..ef98d85593
--- /dev/null
+++ b/tests/Feature/Settings/BrandingSettingsTest.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Tests\Feature\Settings;
+
+use App\Models\User;
+use Tests\Support\InteractsWithSettings;
+use Tests\TestCase;
+
+class BrandingSettingsTest extends TestCase
+{
+ use InteractsWithSettings;
+
+ public function testSiteNameIsRequired()
+ {
+ $this->actingAs(User::factory()->superuser()->create())
+ ->post(route('settings.branding.save', ['site_name' => '']))
+ ->assertInvalid('site_name');
+ }
+}