mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 17:04:04 +00:00
Sync with original attributes
This commit is contained in:
parent
41d300bf7f
commit
2ae1ed099f
2 changed files with 5 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ class VirtualColumnTest extends TestCase
|
|||
// Model has the correct structure when retrieved
|
||||
$model = MyModel::first();
|
||||
$this->assertSame('bar', $model->foo);
|
||||
$this->assertSame('bar', $model->getOriginal('foo'));
|
||||
$this->assertSame(null, $model->data);
|
||||
|
||||
// Model can be updated
|
||||
|
|
@ -43,7 +44,9 @@ class VirtualColumnTest extends TestCase
|
|||
]);
|
||||
|
||||
$this->assertSame('baz', $model->foo);
|
||||
$this->assertSame('bar', $model->getOriginal('foo'));
|
||||
$this->assertSame('xyz', $model->abc);
|
||||
$this->assertSame('xyz', $model->getOriginal('abc'));
|
||||
$this->assertSame(null, $model->data);
|
||||
|
||||
// Model can be retrieved after update & is structure correctly
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue