Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: ✅ add unit tests #464
  • Loading branch information
Angeluz-07 committed Jul 9, 2020
commit d922cbb2d1c53981ab0b1828c79284f3fdfca4f3
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,17 @@ describe('ProjectListHoverComponent', () => {
expect(component.projectsForm.setValue)
.toHaveBeenCalledWith({ project_id: 'customer - xyz'});
});

it('creates time-entry with timezone_offset property', () => {
spyOn(store, 'dispatch');
component.clockIn('1', 'customer', 'project');
expect(store.dispatch).toHaveBeenCalledWith(
new CreateEntry({
project_id: '1',
start_date: new Date().toISOString(),
timezone_offset: new Date().getTimezoneOffset()
})
);
});

});