From 9a3159a9e4e3f882e693d15b34b1ed65092b27c5 Mon Sep 17 00:00:00 2001 From: icfr Date: Thu, 22 Sep 2016 18:13:43 +0200 Subject: [PATCH] [feat] Update test to run with base folder --- test/Commands/testInit.js | 5 +++++ test/index.js | 6 +++--- test/scripts/clean.sh | 9 ++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test/Commands/testInit.js b/test/Commands/testInit.js index bfa77dc..4f1e64d 100644 --- a/test/Commands/testInit.js +++ b/test/Commands/testInit.js @@ -25,6 +25,11 @@ module.exports = { chdir: appdir + '/' }); app.config = rewire('../../bootstrap/config')(); + app.config.laravel.addToApp = { + job: { + example: "example" + } + }; app.configure(function configureApp() { app.use(shell.router({ shell: app diff --git a/test/index.js b/test/index.js index ac2eb27..938a02b 100644 --- a/test/index.js +++ b/test/index.js @@ -3,19 +3,19 @@ var path = require('path'); var jsdiff = require('diff'); var colors = require('colors'); -global.appdir = path.resolve(__dirname, './data/app_fake'); +global.appdir = path.resolve(__dirname, '../data/base'); var each = require('lodash/each'); require('../bootstrap'); module.exports = { - 'test send mail': require('./lib/testSendMail'), 'test history plugins': require('./shell/plugins/testHistory'), 'test help plugins': require('./shell/plugins/testHelp'), 'test init': require('./Commands/testInit'), 'test models creator': require('./Commands/testModelsCreator'), 'test make command': require('./Commands/testMakeCommand'), 'test init database': require('./bootstrap/testInitDatabase'), - 'test Missing Job': require('./Commands/testMissingJob') + 'test Missing Job': require('./Commands/testMissingJob'), + 'test send mail': require('./lib/testSendMail') } global.getDiff = function getDiff(base, other) { diff --git a/test/scripts/clean.sh b/test/scripts/clean.sh index 849b353..2f0e344 100755 --- a/test/scripts/clean.sh +++ b/test/scripts/clean.sh @@ -1,5 +1,8 @@ #!/bin/bash BASEDIR=$(realpath ./) -# find "${BASEDIR}/test/data/app_fake/Config/" -type f ! -regex ".*/\(laravel.js\|core.js\|.gitignore\)" -exec rm {} \; -find "${BASEDIR}/test/data/app_fake/Jobs/" -type f ! -regex ".*/\(laravel.js\|core.js\|.gitignore\)" -exec rm {} \; -find "${BASEDIR}/test/data/app_fake/Commands/" -type f ! -regex ".*/\(laravel.js\|core.js\|.gitignore\)" -exec rm {} \; \ No newline at end of file +find "${BASEDIR}/data/base/Config/" -type f ! -regex ".*/\(laravel.js\|core.js\|.gitignore\)" -exec rm {} \; +find "${BASEDIR}/data/base/Jobs/" -type f ! -regex ".*/\(readme\)" -exec rm {} \; +find "${BASEDIR}/data/base/Commands/" -type f ! -regex ".*/\(readme\)" -exec rm {} \; +find "${BASEDIR}/data/base/resources/langs/" -type f ! -regex ".*/\(readme\)" -exec rm {} \; +rm -Rf "${BASEDIR}/data/base/ModelsNew" +rm -f "${BASEDIR}/data/base/Models/User.js" \ No newline at end of file