1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 02:06:52 +00:00
pixelfed/tests/Unit/CostarTest.php
Daniel Supernault 04a2c93096
Add CostarTest
2019-04-04 19:57:31 -06:00

24 lines
675 B
PHP

<?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);
}
}