File tree 1 file changed +13
-0
lines changed
node-tests/unit/tasks/validate
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ var td = require('testdouble');
4
4
var expect = require ( '../../../helpers/expect' ) ;
5
5
var mockProject = require ( '../../../fixtures/ember-cordova-mock/project' ) ;
6
6
var ValidateLocType = require ( '../../../../lib/tasks/validate/location-type' ) ;
7
+ var logger = require ( '../../../../lib/utils/logger' ) ;
8
+ var contains = td . matchers . contains ;
7
9
8
10
describe ( 'Validate Location Type' , function ( ) {
9
11
var validateLoc ;
@@ -32,4 +34,15 @@ describe('Validate Location Type', function() {
32
34
validateLoc . config = { locationType : 'hash' } ;
33
35
return expect ( validateLoc . run ( ) ) . to . be . fulfilled ;
34
36
} ) ;
37
+
38
+ it ( 'when force is true, it warns vs rejects' , function ( ) {
39
+ validateLoc . config = { locationType : 'auto' } ;
40
+ validateLoc . force = true ;
41
+
42
+ var warnDouble = td . replace ( logger , 'warn' ) ;
43
+
44
+ return validateLoc . run ( ) . then ( function ( ) {
45
+ td . verify ( warnDouble ( contains ( 'You have passed the --force flag' ) ) ) ;
46
+ } )
47
+ } ) ;
35
48
} ) ;
You can’t perform that action at this time.
0 commit comments