diff --git a/.env.example b/.env.example index 79f2bf95084d..9eed8878da3f 100644 --- a/.env.example +++ b/.env.example @@ -30,4 +30,5 @@ MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null +MULTI_DB_ENABLED=true POSTMARK_API_TOKEN= \ No newline at end of file diff --git a/.env.travis b/.env.travis index 37e9eea244f5..4daab15e9ac3 100644 --- a/.env.travis +++ b/.env.travis @@ -21,3 +21,4 @@ TEST_USERNAME=user@example.com TEST_PERMISSIONS_USERNAME=permissions@example.com USER_AUTH_PROVIDER=users CONTACT_AUTH_PROVIDER=contacts +MULTI_DB_ENABLED=true diff --git a/.travis.yml b/.travis.yml index 92637124f084..c6c877e0429e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ install: # these providers require referencing git commit's which cause Travis to fail # - sed -i '/mollie/d' composer.json # - sed -i '/2checkout/d' composer.json - - travis_retry composer install --no-interaction --prefer-dist --no-suggest + - travis_retry composer install --no-interaction before_script: # copy configuration files @@ -53,9 +53,13 @@ before_script: - php artisan migrate --database=db-ninja-01 --seed --no-interaction - php artisan migrate --database=db-ninja-02 --seed --no-interaction - php artisan optimize + - npm install + - npm run production # migrate and seed the database # Start webserver on ninja.test:8000 - - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - ./vendor/laravel/dusk/bin/chromedriver-linux & - php artisan serve & script: diff --git a/app/Mail/VerifyUser.php b/app/Mail/VerifyUser.php index 367afe88cc26..8d084495df1c 100644 --- a/app/Mail/VerifyUser.php +++ b/app/Mail/VerifyUser.php @@ -32,7 +32,7 @@ class VerifyUser extends Mailable implements ShouldQueue { return $this->from('turbo124@gmail.com') //todo - ->subject(__trans('texts.confirmation_subject')) + ->subject(trans('texts.confirmation_subject')) ->markdown('email.auth.verify', ['user' => $this->user]) ->text('email.auth.verify_text'); } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 72b8fcd079fe..4984f90ff6ed 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -70,8 +70,7 @@ - + @endsection - - + diff --git a/tests/Feature/LoginTest.php b/tests/Feature/LoginTest.php index e4c0a0c5c3ea..c7d9e6a73269 100644 --- a/tests/Feature/LoginTest.php +++ b/tests/Feature/LoginTest.php @@ -18,11 +18,16 @@ class LoginTest extends TestCase public function setUp() { parent::setUp(); + Session::start(); } public function testLoginFormDisplayed() { - $response = $this->get('/login'); + + $response = $this->get('/login', [ + '_token' => csrf_token() + ]); + $response->assertStatus(200); } /** @@ -39,7 +44,9 @@ class LoginTest extends TestCase $response = $this->post('/login', [ 'email' => config('ninja.testvars.username'), - 'password' => config('ninja.testvars.password') + 'password' => config('ninja.testvars.password'), + '_token' => csrf_token() + ]); $response->assertStatus(302); @@ -60,7 +67,8 @@ class LoginTest extends TestCase $response = $this->post('/login', [ 'email' => config('ninja.testvars.username'), - 'password' => 'invalid' + 'password' => 'invaliddfd', + '_token' => csrf_token() ]); $response->assertSessionHasErrors(); @@ -78,7 +86,9 @@ class LoginTest extends TestCase 'account_id' => $account->id, ]); - $response = $this->actingAs($user)->post('/logout'); + $response = $this->actingAs($user)->post('/logout',[ + '_token' => csrf_token() + ]); $response->assertStatus(302); $this->assertGuest(); }