mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Merge pull request #1255 from pixelfed/frontend-ui-refactor
Add unit test
This commit is contained in:
commit
da683569ae
1 changed files with 20 additions and 0 deletions
20
tests/Unit/Lexer/RestrictedNameTest.php
Normal file
20
tests/Unit/Lexer/RestrictedNameTest.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit\Lexer;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use App\Util\Lexer\RestrictedNames;
|
||||
|
||||
class RestrictedNameTest extends TestCase
|
||||
{
|
||||
/** @test */
|
||||
public function restrictedUsername()
|
||||
{
|
||||
$this->assertContains('p', RestrictedNames::get());
|
||||
$this->assertContains('admin', RestrictedNames::get());
|
||||
$this->assertNotContains('dansup', RestrictedNames::get());
|
||||
$this->assertNotContains('lain', RestrictedNames::get());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue