Skip to content

Commit

Permalink
Remove references to AppUser to allow using custom models structure (#24
Browse files Browse the repository at this point in the history
)
  • Loading branch information
superbiche authored and hootlex committed Jul 16, 2017
1 parent b0d7965 commit e9bbc3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/ModerationScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Hootlex\Moderation;

use App\User;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
Expand Down
3 changes: 2 additions & 1 deletion tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function createPost($overrides = [], $amount = 1)

function actingAsUser()
{
return $this->actingAs(\App\User::create(['name' => 'tester', 'email' => mt_rand(1,9999).'tester@test.com', 'password' => 'password']));
$userModel = config('auth.providers.users.model', config('auth.model', 'App\User'));
return $this->actingAs($userModel::create(['name' => 'tester', 'email' => mt_rand(1,9999).'tester@test.com', 'password' => 'password']));
}
}

0 comments on commit e9bbc3a

Please sign in to comment.