Fixes for travis (#2474)

* fixes for travis
This commit is contained in:
David Bomba 2018-10-29 15:24:12 +11:00 committed by GitHub
parent ede0668caf
commit 2d9f7b3ae6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 10 deletions

View File

@ -30,4 +30,5 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
MULTI_DB_ENABLED=true
POSTMARK_API_TOKEN= POSTMARK_API_TOKEN=

View File

@ -21,3 +21,4 @@ TEST_USERNAME=user@example.com
TEST_PERMISSIONS_USERNAME=permissions@example.com TEST_PERMISSIONS_USERNAME=permissions@example.com
USER_AUTH_PROVIDER=users USER_AUTH_PROVIDER=users
CONTACT_AUTH_PROVIDER=contacts CONTACT_AUTH_PROVIDER=contacts
MULTI_DB_ENABLED=true

View File

@ -38,7 +38,7 @@ install:
# these providers require referencing git commit's which cause Travis to fail # these providers require referencing git commit's which cause Travis to fail
# - sed -i '/mollie/d' composer.json # - sed -i '/mollie/d' composer.json
# - sed -i '/2checkout/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: before_script:
# copy configuration files # 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-01 --seed --no-interaction
- php artisan migrate --database=db-ninja-02 --seed --no-interaction - php artisan migrate --database=db-ninja-02 --seed --no-interaction
- php artisan optimize - php artisan optimize
- npm install
- npm run production
# migrate and seed the database # migrate and seed the database
# Start webserver on ninja.test:8000 # 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 & - php artisan serve &
script: script:

View File

@ -32,7 +32,7 @@ class VerifyUser extends Mailable implements ShouldQueue
{ {
return $this->from('turbo124@gmail.com') //todo return $this->from('turbo124@gmail.com') //todo
->subject(__trans('texts.confirmation_subject')) ->subject(trans('texts.confirmation_subject'))
->markdown('email.auth.verify', ['user' => $this->user]) ->markdown('email.auth.verify', ['user' => $this->user])
->text('email.auth.verify_text'); ->text('email.auth.verify_text');
} }

View File

@ -70,8 +70,7 @@
</div> </div>
</div> </div>
</div> </div>
</body>
@endsection @endsection
</body>
</html>

View File

@ -18,11 +18,16 @@ class LoginTest extends TestCase
public function setUp() public function setUp()
{ {
parent::setUp(); parent::setUp();
Session::start();
} }
public function testLoginFormDisplayed() public function testLoginFormDisplayed()
{ {
$response = $this->get('/login');
$response = $this->get('/login', [
'_token' => csrf_token()
]);
$response->assertStatus(200); $response->assertStatus(200);
} }
/** /**
@ -39,7 +44,9 @@ class LoginTest extends TestCase
$response = $this->post('/login', [ $response = $this->post('/login', [
'email' => config('ninja.testvars.username'), 'email' => config('ninja.testvars.username'),
'password' => config('ninja.testvars.password') 'password' => config('ninja.testvars.password'),
'_token' => csrf_token()
]); ]);
$response->assertStatus(302); $response->assertStatus(302);
@ -60,7 +67,8 @@ class LoginTest extends TestCase
$response = $this->post('/login', [ $response = $this->post('/login', [
'email' => config('ninja.testvars.username'), 'email' => config('ninja.testvars.username'),
'password' => 'invalid' 'password' => 'invaliddfd',
'_token' => csrf_token()
]); ]);
$response->assertSessionHasErrors(); $response->assertSessionHasErrors();
@ -78,7 +86,9 @@ class LoginTest extends TestCase
'account_id' => $account->id, 'account_id' => $account->id,
]); ]);
$response = $this->actingAs($user)->post('/logout'); $response = $this->actingAs($user)->post('/logout',[
'_token' => csrf_token()
]);
$response->assertStatus(302); $response->assertStatus(302);
$this->assertGuest(); $this->assertGuest();
} }