Support functionality for per-egg features
This commit is contained in:
parent
7ec614ed2c
commit
7618f306bd
7 changed files with 70 additions and 20 deletions
|
@ -88,18 +88,4 @@ class EggUpdateServiceTest extends TestCase
|
|||
$this->assertEquals(trans('exceptions.nest.egg.must_be_child'), $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that an integer linking to a model can be passed in place of the Egg model.
|
||||
*/
|
||||
public function testIntegerCanBePassedInPlaceOfModel()
|
||||
{
|
||||
$this->repository->shouldReceive('find')->with($this->model->id)->once()->andReturn($this->model);
|
||||
$this->repository->shouldReceive('withoutFreshModel->update')
|
||||
->with($this->model->id, ['test_field' => 'field_value'])->once()->andReturnNull();
|
||||
|
||||
$this->service->handle($this->model->id, ['test_field' => 'field_value']);
|
||||
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue