1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 13:14:05 +00:00

Get old tests to pass

This commit is contained in:
Samuel Štancl 2020-05-03 04:00:34 +02:00
parent 65ebc043dc
commit 439b5b1dc1
28 changed files with 154 additions and 100 deletions

View file

@ -12,15 +12,9 @@ use Stancl\Tenancy\Tests\Etc\ExampleSeeder;
class CommandsTest extends TestCase
{
public $autoCreateTenant = true;
public $autoInitTenancy = false;
public function setUp(): void
{
parent::setUp();
config(['tenancy.migration_paths', [database_path('../migrations')]]);
}
/** @test */
public function migrate_command_doesnt_change_the_db_connection()
{
@ -173,6 +167,7 @@ class CommandsTest extends TestCase
$tenant = tenancy()->all()[1]; // a tenant is autocreated prior to this
$data = $tenant->data;
unset($data['id']);
unset($data['_tenancy_db_name']);
$this->assertSame(['plan' => 'free', 'email' => 'foo@test.local'], $data);
$this->assertSame(['aaa.localhost', 'bbb.localhost'], $tenant->domains);