-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds early return if no pending event is present
closes #42
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -461,4 +461,15 @@ public function it_used_provided_stream_name(): void | |
|
||
$this->repository->saveAggregateRoot($user); | ||
} | ||
|
||
/** | ||
* @test | ||
* @see https://github.com/prooph/event-sourcing/issues/42 | ||
*/ | ||
public function it_does_not_throw_an_exception_if_no_pending_event_is_present() | ||
{ | ||
$user = User::create('John Doe', '[email protected]'); | ||
$this->repository->saveAggregateRoot($user); | ||
$this->repository->saveAggregateRoot($user); | ||
} | ||
} |