Fix existing tests

This commit is contained in:
Dane Everitt 2017-10-08 15:44:28 -05:00
parent 6e02e9491a
commit 159ad3079f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 40 additions and 51 deletions

View file

@ -115,7 +115,7 @@ class VariableValidatorServiceTest extends TestCase
*/
public function testEmptyResultSetShouldBeReturnedIfNoVariablesAreFound()
{
$this->optionVariableRepository->shouldReceive('findWhere')->with([['option_id', '=', 1]])->andReturn([]);
$this->optionVariableRepository->shouldReceive('findWhere')->with([['egg_id', '=', 1]])->andReturn([]);
$response = $this->service->validate(1);
@ -129,7 +129,7 @@ class VariableValidatorServiceTest extends TestCase
*/
public function testValidatorShouldNotProcessVariablesSetAsNotUserEditableWhenAdminFlagIsNotPassed()
{
$this->optionVariableRepository->shouldReceive('findWhere')->with([['option_id', '=', 1]])->andReturn($this->variables);
$this->optionVariableRepository->shouldReceive('findWhere')->with([['egg_id', '=', 1]])->andReturn($this->variables);
$this->validator->shouldReceive('make')->with([
'variable_value' => 'Test_SomeValue_0',
@ -161,7 +161,7 @@ class VariableValidatorServiceTest extends TestCase
*/
public function testValidatorShouldProcessAllVariablesWhenAdminFlagIsSet()
{
$this->optionVariableRepository->shouldReceive('findWhere')->with([['option_id', '=', 1]])->andReturn($this->variables);
$this->optionVariableRepository->shouldReceive('findWhere')->with([['egg_id', '=', 1]])->andReturn($this->variables);
foreach ($this->variables as $key => $variable) {
$this->validator->shouldReceive('make')->with([
@ -198,7 +198,7 @@ class VariableValidatorServiceTest extends TestCase
*/
public function testValidatorShouldThrowExceptionWhenAValidationErrorIsEncountered()
{
$this->optionVariableRepository->shouldReceive('findWhere')->with([['option_id', '=', 1]])->andReturn($this->variables);
$this->optionVariableRepository->shouldReceive('findWhere')->with([['egg_id', '=', 1]])->andReturn($this->variables);
$this->validator->shouldReceive('make')->with([
'variable_value' => null,