1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Working on adding check-data to Travis

This commit is contained in:
Hillel Coren 2017-03-09 17:48:21 +02:00
parent 1451829589
commit 01ca660b6b
4 changed files with 19 additions and 1 deletions

View File

@ -70,7 +70,6 @@ before_script:
#- php artisan ninja:create-test-data 25
script:
#- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
@ -83,6 +82,7 @@ script:
#- php ./vendor/codeception/codeception/codecept run --debug acceptance OnlinePaymentCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php
- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
#- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env
#- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php

View File

@ -320,6 +320,16 @@ class AppController extends BaseController
return RESULT_SUCCESS;
}
public function checkData()
{
try {
Artisan::call('ninja:check-data');
return RESULT_SUCCESS;
} catch (Exception $exception) {
return RESULT_FAILURE;
}
}
public function stats()
{
if (! hash_equals(Input::get('password'), env('RESELLER_PASSWORD'))) {

View File

@ -113,6 +113,10 @@ if (Utils::isReseller()) {
Route::post('/reseller_stats', 'AppController@stats');
}
if (Utils::isTravis() || true) {
Route::get('/check_data', 'AppController@checkData');
}
Route::group(['middleware' => 'auth:user'], function () {
Route::get('dashboard', 'DashboardController@index');
Route::get('dashboard_chart_data/{group_by}/{start_date}/{end_date}/{currency_id}/{include_expenses}', 'DashboardController@chartData');

View File

@ -84,6 +84,10 @@ $I->see('Invoice Email');
$I->amOnPage('/reports');
$I->see('Reports');
$I->amOnPage('/check_data');
$I->see('success');
//try to logout
//$I->click('#myAccountButton');
//$I->see('Log Out');