-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from RonasIT/add-nova-test-trait
chore: rewrite model test state assertion.
- Loading branch information
Showing
7 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
tests/fixtures/ModelTestStateTest/assertion_fixture_without_json_fields.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"updated": [ | ||
{ | ||
"id": 1, | ||
"name": "name1 updated" | ||
} | ||
], | ||
"created": [ | ||
{ | ||
"id": 4, | ||
"name": "name44", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
} | ||
], | ||
"deleted": [ | ||
{ | ||
"id": 5, | ||
"name": "name5", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
} | ||
] | ||
} |
26 changes: 26 additions & 0 deletions
26
...xtures/ModelTestStateTest/changes_equals_fixture_without_json_fields/changed_dataset.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"name": "name1 updated", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "name2", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
}, | ||
{ | ||
"id": 3, | ||
"name": "name3", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
}, | ||
{ | ||
"id": 4, | ||
"name": "name44", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
} | ||
] |
26 changes: 26 additions & 0 deletions
26
...xtures/ModelTestStateTest/changes_equals_fixture_without_json_fields/initial_dataset.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"name": "name1", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "name2", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
}, | ||
{ | ||
"id": 3, | ||
"name": "name3", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
}, | ||
{ | ||
"id": 5, | ||
"name": "name5", | ||
"created_at": "2018-10-10 10:10:10", | ||
"updated_at": "2018-10-10 10:10:10" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace RonasIT\Support\Tests\Support\Mock; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use RonasIT\Support\Traits\ModelTrait; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class TestModelWithoutJsonFields extends Model | ||
{ | ||
use ModelTrait, SoftDeletes; | ||
|
||
protected $fillable = [ | ||
'name', | ||
]; | ||
} |