Create test for app/Observers/ScoreSheetObserver
This commit is contained in:
parent
fbe74571f6
commit
f9cb50a445
|
|
@ -21,17 +21,17 @@ afterEach(function () {
|
|||
it('totals an entries scores when a score sheet is created', function () {
|
||||
$this->mock->shouldReceive('__invoke')
|
||||
->once()
|
||||
->with(\Mockery::type(Entry::class), true)
|
||||
->with(Mockery::type(Entry::class), true)
|
||||
->andReturn(null);
|
||||
Cache::shouldReceive('forget')->twice();
|
||||
|
||||
$sheet = ScoreSheet::factory()->create();
|
||||
ScoreSheet::factory()->create();
|
||||
});
|
||||
|
||||
it('totals an entries scores when a score sheet is update', function () {
|
||||
$this->mock->shouldReceive('__invoke')
|
||||
->twice()
|
||||
->with(\Mockery::type(Entry::class), true)
|
||||
->with(Mockery::type(Entry::class), true)
|
||||
->andReturn(null);
|
||||
Cache::shouldReceive('forget')->times(4);
|
||||
$sheet = ScoreSheet::factory()->create();
|
||||
|
|
@ -41,7 +41,7 @@ it('totals an entries scores when a score sheet is update', function () {
|
|||
it('totals an entries scores when a score sheet is deleted', function () {
|
||||
$this->mock->shouldReceive('__invoke')
|
||||
->twice()
|
||||
->with(\Mockery::type(Entry::class), true)
|
||||
->with(Mockery::type(Entry::class), true)
|
||||
->andReturn(null);
|
||||
Cache::shouldReceive('forget')->times(4);
|
||||
$sheet = ScoreSheet::factory()->create();
|
||||
|
|
|
|||
Loading…
Reference in New Issue