Skip to content

Commit

Permalink
Merge pull request #30 from specialtactics/chore/remove-legacy-fixure
Browse files Browse the repository at this point in the history
Remove admin password, also make the credentials array a bit clearer
  • Loading branch information
specialtactics authored Nov 9, 2019
2 parents 8ba871d + 5864407 commit 2b5158f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions database/seeds/UserStorySeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class UserStorySeeder extends BaseSeeder
/**
* Credentials
*/
const ADMIN_CREDENTIALS = ['[email protected]', 'secret'];
const ADMIN_CREDENTIALS = [
'email' => '[email protected]',
];

public function runFake()
{
Expand All @@ -18,7 +20,7 @@ public function runFake()
// Create an admin user
factory(App\Models\User::class)->create([
'name' => 'Admin',
'email' => static::ADMIN_CREDENTIALS[0],
'email' => static::ADMIN_CREDENTIALS['email'],
'primary_role' => $roles->where('name', 'admin')->first()->role_id,
]);

Expand Down
2 changes: 1 addition & 1 deletion tests/ApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function actingAsUser($credentials)
*/
public function actingAsAdmin()
{
$user = User::where('email', UserStorySeeder::ADMIN_CREDENTIALS[0])->firstOrFail();
$user = User::where('email', UserStorySeeder::ADMIN_CREDENTIALS['email'])->firstOrFail();

return $this->actingAs($user);
}
Expand Down

0 comments on commit 2b5158f

Please sign in to comment.