diff --git a/tests/Rules/UniqueCaseInsensitiveTest.php b/tests/Rules/UniqueCaseInsensitiveTest.php index 40fbf58c6..bf591460e 100644 --- a/tests/Rules/UniqueCaseInsensitiveTest.php +++ b/tests/Rules/UniqueCaseInsensitiveTest.php @@ -19,13 +19,14 @@ $user = User::factory()->create(['username' => 'johndoe']); $user->delete(); - expect($this->subject->withTrashed()->passes(null, 'johndoe'))->toBeTrue(); + expect($this->subject->withTrashed()->passes(null, 'johndoe'))->toBeFalse(); }); it('should exclude trashed data by default', function () { $user = User::factory()->create(['username' => 'johndoe']); + $user->delete(); - expect($this->subject->withTrashed()->passes(null, 'johndoe'))->toBeFalse(); + expect($this->subject->passes(null, 'johndoe'))->toBeTrue(); }); it('should exclude specified data', function () { diff --git a/tests/database/migrations/2014_10_12_000000_create_users_table.php b/tests/database/migrations/2014_10_12_000000_create_users_table.php index 771ae13c1..71e3996ef 100644 --- a/tests/database/migrations/2014_10_12_000000_create_users_table.php +++ b/tests/database/migrations/2014_10_12_000000_create_users_table.php @@ -13,6 +13,7 @@ public function up() Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name')->index(); + $table->string('name_slug')->nullable(false)->unique(); $table->string('username')->index()->nullable(); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); @@ -23,6 +24,7 @@ public function up() $table->string('timezone')->default('UTC')->nullable(); $table->rememberToken(); $table->timestamps(); + $table->softDeletes(); }); } }