Skip to content

Commit 17208d2

Browse files
committed
fix: TT-593 coverage time-entries-table
1 parent b9ea8e9 commit 17208d2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/app/modules/reports/components/time-entries-table/time-entries-table.component.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { getReportDataSource } from 'src/app/modules/time-clock/store/entry.sele
88
import { EntryState } from '../../../time-clock/store/entry.reducer';
99
import { TimeEntriesTableComponent } from './time-entries-table.component';
1010
import { ActionsSubject } from '@ngrx/store';
11+
import { UserActionTypes } from 'src/app/modules/users/store';
1112

1213
describe('Reports Page', () => {
1314
describe('TimeEntriesTableComponent', () => {
@@ -161,6 +162,20 @@ describe('Reports Page', () => {
161162

162163
});
163164

165+
it('Should populate the users with the payload from the action executed', () => {
166+
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
167+
const usersArray = []
168+
const action = {
169+
type: UserActionTypes.LOAD_USERS_SUCCESS,
170+
payload: usersArray
171+
};
172+
173+
actionSubject.next(action);
174+
175+
176+
expect(component.users).toEqual(usersArray);
177+
});
178+
164179
afterEach(() => {
165180
fixture.destroy();
166181
});

0 commit comments

Comments
 (0)