1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 15:34:03 +00:00

global_asset test

This commit is contained in:
Samuel Štancl 2019-09-21 17:29:26 +02:00
parent b9054864aa
commit bd08979e0c

View file

@ -55,5 +55,15 @@ class TenantAssetTest extends TestCase
$this->assertSame("https://an-s3-bucket/tenant{$tenant->id}/foo", asset('foo')); $this->assertSame("https://an-s3-bucket/tenant{$tenant->id}/foo", asset('foo'));
} }
// todo test global asset /** @test */
public function global_asset_helper_returns_the_same_url_regardless_of_tenancy_initialization()
{
$original = global_asset('foobar');
$this->assertSame(asset('foobar'), global_asset('foobar'));
Tenant::create(['foo.localhost']);
tenancy()->init('foo.localhost');
$this->assertSame($original, global_asset('foobar'));
}
} }