fix auto-stop when starting timesheet with tags (#2067)

This commit is contained in:
Kevin Papst
2020-10-27 18:35:22 +01:00
committed by GitHub
parent 8c39b4197e
commit 61c0cbc887
3 changed files with 55 additions and 33 deletions

View File

@@ -128,12 +128,14 @@ class TimesheetServiceTest extends TestCase
$timesheet2->expects($this->once())->method('setBegin');
$timesheet2->expects($this->once())->method('setEnd');
$newTimesheet = new Timesheet();
$repository = $this->createMock(TimesheetRepository::class);
$repository->method('getActiveEntries')->willReturn([$timesheet1, $timesheet2]);
$repository->method('getActiveEntries')->willReturn([$newTimesheet, $timesheet1, $timesheet2]);
$sut = $this->getSut($authorizationChecker, null, null, $repository);
$sut->saveNewTimesheet(new Timesheet());
$sut->saveNewTimesheet($newTimesheet);
}
public function testCannotRestartedPersistedTimesheet()