mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Add CostarTest
This commit is contained in:
parent
1580bb6b4b
commit
04a2c93096
1 changed files with 24 additions and 0 deletions
24
tests/Unit/CostarTest.php
Normal file
24
tests/Unit/CostarTest.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Unit;
|
||||||
|
|
||||||
|
use App\Util\ActivityPub\Helpers;
|
||||||
|
use Tests\TestCase;
|
||||||
|
use Illuminate\Foundation\Testing\WithFaker;
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
|
||||||
|
class CostarTest extends TestCase
|
||||||
|
{
|
||||||
|
/** @test */
|
||||||
|
public function blockedDomain()
|
||||||
|
{
|
||||||
|
$domains = config('costar.domain.block');
|
||||||
|
$this->assertTrue(in_array('example.net', $domains));
|
||||||
|
|
||||||
|
$blockedDomain = 'https://example.org/user/replyGuy';
|
||||||
|
$this->assertFalse(Helpers::validateUrl($blockedDomain));
|
||||||
|
|
||||||
|
$unblockedDomain = 'https://pixelfed.org/user/pixelfed';
|
||||||
|
$this->assertEquals(Helpers::validateUrl($unblockedDomain), $unblockedDomain);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue