Skip to content

Commit

Permalink
Merge pull request #49 from specialtactics/feature/add-testing
Browse files Browse the repository at this point in the history
Fix local testing, fix test class name
  • Loading branch information
specialtactics authored Nov 23, 2020
2 parents 09d3f74 + 01dbf5c commit 1fdfd29
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
13 changes: 13 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@
'prefix_indexes' => true,
],

'test' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE_TEST', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
],

/*
Expand Down
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="DB_CONNECTION" value="test"/>
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
Expand Down
2 changes: 1 addition & 1 deletion tests/Api/UserControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Tests\ApiTestCase;
use App\Models\User;

class UserTest extends ApiTestCase
class UserControllerTest extends ApiTestCase
{
public function testGetAll() {
$jsonResponse = $this->actingAsAdmin()->json('GET', '/users');
Expand Down

0 comments on commit 1fdfd29

Please sign in to comment.