Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Feb 11, 2022
1 parent a2c8e0a commit 3eccf5a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/CypressControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ protected function setUp(): void
{
parent::setUp();

$this->loadLaravelMigrations();
$this->loadMigrationsFrom(__DIR__.'/database/migrations');
$this->withFactories(__DIR__ . '/database/factories');

Expand Down
20 changes: 20 additions & 0 deletions tests/database/migrations/0000_00_00_000000_create_users_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersTable extends Migration
{
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->string('plan');
$table->timestamps();
});
}
}
4 changes: 1 addition & 3 deletions tests/support/TestUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ class TestUser extends Authenticatable
protected $table = 'users';
protected $hidden = ['plan'];

protected static function boot()
protected static function booted()
{
parent::boot();

static::created(function ($user) {
$user->profile()->create(['location' => 'USA']);
});
Expand Down

0 comments on commit 3eccf5a

Please sign in to comment.