@@ -46,23 +46,18 @@ module('Integration | Component | user-status-modal', function (hooks) {
4646 } ) ;
4747
4848 test ( 'payload contains relevant data when status is changed to OOO' , async function ( assert ) {
49- assert . expect ( 6 ) ;
49+ assert . expect ( 4 ) ;
5050 this . setProperties ( {
5151 newStatus : 'OOO' ,
5252 showUserStateModal : true ,
5353 toggleUserStateModal : ( ) => {
5454 this . set ( 'showUserStateModal' , ! this . showUserStateModal ) ;
5555 } ,
56- updateStatus : ( statusPayLoad ) => {
57- const {
58- currentStatus : { state, from, until, message, updatedAt } ,
59- } = statusPayLoad ;
60- console . log ( 'Payload:' , JSON . stringify ( statusPayLoad , null , 2 ) ) ;
61- assert . strictEqual ( state , 'OOO' , 'New state is present in the payload' ) ;
56+ createOOORequest : ( from , until , reason ) => {
6257 assert . strictEqual (
63- message ,
58+ reason ,
6459 'OOO due to Bad Health' ,
65- 'Message is present in the payload' ,
60+ 'Reason is present in the payload' ,
6661 ) ;
6762 assert . strictEqual (
6863 typeof from ,
@@ -74,11 +69,6 @@ module('Integration | Component | user-status-modal', function (hooks) {
7469 'number' ,
7570 'Until is a numeric timestamp' ,
7671 ) ;
77- assert . strictEqual (
78- typeof updatedAt ,
79- 'number' ,
80- 'UpdatedAt is a numeric timestamp' ,
81- ) ;
8272 } ,
8373 } ) ;
8474 await render ( hbs `
@@ -87,6 +77,7 @@ module('Integration | Component | user-status-modal', function (hooks) {
8777 @newStatus={{this.newStatus}}
8878 @toggleUserStateModal={{this.toggleUserStateModal}}
8979 @updateStatus={{this.updateStatus}}
80+ @createOOORequest={{this.createOOORequest}}
9081 />
9182 ` ) ;
9283
@@ -125,7 +116,6 @@ module('Integration | Component | user-status-modal', function (hooks) {
125116 newStatus : 'OOO' ,
126117 showUserStateModal : true ,
127118 isStatusUpdating : false ,
128- isDevMode : true ,
129119 createOOORequest : ( ) => { } ,
130120 } ) ;
131121
@@ -136,7 +126,6 @@ module('Integration | Component | user-status-modal', function (hooks) {
136126 @toggleUserStateModal={{this.toggleUserStateModal}}
137127 @updateStatus={{this.updateStatus}}
138128 @isStatusUpdating={{this.isStatusUpdating}}
139- @dev={{this.isDevMode}}
140129 @createOOORequest={{this.createOOORequest}}
141130 />
142131 ` ) ;
0 commit comments