@@ -61,6 +61,7 @@ describe('s3-index plugin', function() {
61
61
} ) ;
62
62
63
63
context = {
64
+ deployTarget : "qa" ,
64
65
ui : mockUi ,
65
66
66
67
project : stubProject ,
@@ -262,6 +263,15 @@ describe('s3-index plugin', function() {
262
263
assert . equal ( Object . prototype . hasOwnProperty . call ( s3Options , 'serverSideEncryption' ) , false , 'serverSideEncryption filtered correctly' ) ;
263
264
} ) ;
264
265
} ) ;
266
+
267
+ it ( 'displays activation message when revision is activated' , function ( ) {
268
+ var promise = plugin . activate ( context ) ;
269
+
270
+ return assert . isFulfilled ( promise )
271
+ . then ( function ( ) {
272
+ assert . match ( mockUi . messages . join ( "\n" ) , new RegExp ( `✔ Activated revision \`${ REVISION_KEY } \`` ) ) ;
273
+ } ) ;
274
+ } )
265
275
} ) ;
266
276
267
277
describe ( '#fetchInitialRevisions' , function ( ) {
@@ -315,5 +325,21 @@ describe('s3-index plugin', function() {
315
325
} ) ;
316
326
} ) ;
317
327
} ) ;
328
+
329
+ describe ( '#didDeploy' , function ( ) {
330
+ it ( "prints default message about lack of activation when revision has not been activated" , function ( ) {
331
+ plugin . upload = function ( ) { } ;
332
+ plugin . activate = function ( ) { } ;
333
+ plugin . beforeHook ( context ) ;
334
+ plugin . configure ( context ) ;
335
+ plugin . beforeHook ( context ) ;
336
+ plugin . didDeploy ( context ) ;
337
+
338
+ let message = mockUi . messages . join ( "\n" )
339
+ assert . match ( message , new RegExp ( `Deployed but did not activate revision ${ REVISION_KEY } ` ) ) ;
340
+ assert . match ( message , / T o a c t i v a t e , r u n / ) ;
341
+ assert . match ( message , new RegExp ( `ember deploy:activate qa --revision=${ REVISION_KEY } ` ) ) ;
342
+ } ) ;
343
+ } ) ;
318
344
} ) ;
319
345
} ) ;
0 commit comments