Skip to content

Commit d922cbb

Browse files
committed
test: ✅ add unit tests #464
1 parent 381236b commit d922cbb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,17 @@ describe('ProjectListHoverComponent', () => {
118118
expect(component.projectsForm.setValue)
119119
.toHaveBeenCalledWith({ project_id: 'customer - xyz'});
120120
});
121+
122+
it('creates time-entry with timezone_offset property', () => {
123+
spyOn(store, 'dispatch');
124+
component.clockIn('1', 'customer', 'project');
125+
expect(store.dispatch).toHaveBeenCalledWith(
126+
new CreateEntry({
127+
project_id: '1',
128+
start_date: new Date().toISOString(),
129+
timezone_offset: new Date().getTimezoneOffset()
130+
})
131+
);
132+
});
133+
121134
});

0 commit comments

Comments
 (0)