added uuid query scope

This commit is contained in:
Jake Mitchell
2016-06-26 01:00:13 +00:00
parent ddea4dd573
commit 70cd832876
4 changed files with 45 additions and 0 deletions

View File

@@ -30,4 +30,15 @@ class MetaTest extends \PHPUnit_Framework_TestCase
$model->setRawUuid($uuid);
$this->assertEquals($uuid, $model->getUuid());
}
public function testUuidQuery ()
{
$model = Meta::create([
'meta' => serialize(['name' => 'Tony'])
]);
$queried = Meta::withUuid($model->getUuid())->first();
$this->assertEquals($model->read('name'), $queried->read('name'));
}
}