From 49d0fb47fe2c809315720f874dac5fc99e58e3cc Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Fri, 23 Sep 2022 15:49:48 +0200 Subject: [PATCH] fixing tests now due to configure() now being executed --- box.json | 6 +++--- server-lucee@5.json | 4 ++-- .../tests/specs/unit/interceptors/MementifierTest.cfc | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/box.json b/box.json index 015420e..c93504b 100644 --- a/box.json +++ b/box.json @@ -42,9 +42,9 @@ "build:module":"task run taskFile=build/Build.cfc :projectName=`package show slug` :version=`package show version`", "build:docs":"task run taskFile=build/Build.cfc target=docs :projectName=`package show slug` :version=`package show version`", "release":"recipe build/release.boxr", - "format":"cfformat run interceptors/,models/,test-harness/**/*.cfc ./.cfformat.json --overwrite", - "format:watch":"cfformat watch interceptors/,models/,test-harness/**/*.cfc ./.cfformat.json", - "format:check":"cfformat check interceptors/,models/,test-harness/**/*.cfc ./.cfformat.json", + "format":"cfformat run interceptors/,models/,test-harness/tests/**/*.cfc ./.cfformat.json --overwrite", + "format:watch":"cfformat watch interceptors/,models/,test-harness/tests/**/*.cfc ./.cfformat.json", + "format:check":"cfformat check interceptors/,models/,test-harness/tests/**/*.cfc ./.cfformat.json", "cfpm":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\"' | run", "cfpm:install":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\" install ${1}' | run", "install:2021":"run-script cfpm:install zip,debugger,orm,mysql,postgresql,sqlserver,feed,chart", diff --git a/server-lucee@5.json b/server-lucee@5.json index be64b5c..771801b 100644 --- a/server-lucee@5.json +++ b/server-lucee@5.json @@ -11,13 +11,13 @@ "rewrites":{ "enable":"true" }, - "webroot":"test-harness", + "webroot":"test-harness", "aliases":{ "/moduleroot/mementifier":"../" } }, "openBrowser":"false", - "cfconfig":{ + "cfconfig":{ "file":".cfconfig.json" } } diff --git a/test-harness/tests/specs/unit/interceptors/MementifierTest.cfc b/test-harness/tests/specs/unit/interceptors/MementifierTest.cfc index b553dd0..0f3f9c6 100644 --- a/test-harness/tests/specs/unit/interceptors/MementifierTest.cfc +++ b/test-harness/tests/specs/unit/interceptors/MementifierTest.cfc @@ -2,6 +2,7 @@ component extends="coldbox.system.testing.BaseInterceptorTest" interceptor="meme function beforeAll(){ super.beforeAll(); + setup(); variables.moduleSettings = { @@ -22,12 +23,15 @@ component extends="coldbox.system.testing.BaseInterceptorTest" interceptor="meme // If not empty, convert all date/times to the specific timezone convertToTimezone : "" }; + variables.interceptor.$property( "settings", "variables", variables.moduleSettings ); + variables.interceptor.configure(); + var mockData = { fname : "testuser", lname : "testuser",