Skip to content

Commit

Permalink
Merge pull request #55 from BRACKETS-by-TRIAD/profile-fix-tests
Browse files Browse the repository at this point in the history
fixed tests for profile routes
  • Loading branch information
RichardDominik authored Nov 22, 2019
2 parents 284fa51 + d0d02b4 commit 8b71a40
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
10 changes: 4 additions & 6 deletions tests/Feature/Profile/DefaultProfileGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ class ProfileController extends Controller
/* Auto-generated admin routes */
Route::middleware([\'auth:\' . config(\'admin-auth.defaults.guard\'), \'admin\'])->group(static function () {
Route::prefix(\'admin\')->namespace(\'Admin\')->name(\'admin/\')->group(static function() {
Route::prefix(\'admin-users\')->name(\'admin-users/\')->group(static function() {
Route::get(\'/profile\', \'ProfileController@editProfile\')->name(\'edit-profile\');
Route::post(\'/profile\', \'ProfileController@updateProfile\')->name(\'update-profile\');
Route::get(\'/password\', \'ProfileController@editPassword\')->name(\'edit-password\');
Route::post(\'/password\', \'ProfileController@updatePassword\')->name(\'update-password\');
});
Route::get(\'/profile\', \'ProfileController@editProfile\')->name(\'edit-profile\');
Route::post(\'/profile\', \'ProfileController@updateProfile\')->name(\'update-profile\');
Route::get(\'/password\', \'ProfileController@editPassword\')->name(\'edit-password\');
Route::post(\'/password\', \'ProfileController@updatePassword\')->name(\'update-password\');
});
});',
File::get($filePathRoute));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ class ProfileController extends Controller
/* Auto-generated admin routes */
Route::middleware([\'auth:\' . config(\'admin-auth.defaults.guard\'), \'admin\'])->group(static function () {
Route::prefix(\'admin\')->namespace(\'Admin\')->name(\'admin/\')->group(static function() {
Route::prefix(\'admin-users\')->name(\'admin-users/\')->group(static function() {
Route::get(\'/profile\', \'Auth\ProfileController@editProfile\')->name(\'edit-profile\');
Route::post(\'/profile\', \'Auth\ProfileController@updateProfile\')->name(\'update-profile\');
Route::get(\'/password\', \'Auth\ProfileController@editPassword\')->name(\'edit-password\');
Route::post(\'/password\', \'Auth\ProfileController@updatePassword\')->name(\'update-password\');
});
Route::get(\'/profile\', \'Auth\ProfileController@editProfile\')->name(\'edit-profile\');
Route::post(\'/profile\', \'Auth\ProfileController@updateProfile\')->name(\'update-profile\');
Route::get(\'/password\', \'Auth\ProfileController@editPassword\')->name(\'edit-password\');
Route::post(\'/password\', \'Auth\ProfileController@updatePassword\')->name(\'update-password\');
});
});',
File::get($filePathRoute));
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ protected function getEnvironmentSetUp($app)
'driver' => 'pgsql',
'host' => 'testing',
'port' => '5432',
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'bestsecret'),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
Expand Down
6 changes: 3 additions & 3 deletions tests/UserTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ protected function getEnvironmentSetUp($app)
'driver' => 'pgsql',
'host' => 'testing',
'port' => '5432',
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'bestsecret'),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
Expand Down

0 comments on commit 8b71a40

Please sign in to comment.