Support functionality for per-egg features

This commit is contained in:
Dane Everitt 2020-11-02 20:20:36 -08:00
parent 7ec614ed2c
commit 7618f306bd
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 70 additions and 20 deletions

View file

@ -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);
}
}