mirror of
https://github.com/michaelachrisco/ReadOnlyTraitLaravel.git
synced 2024-12-26 23:57:21 -08:00
feat(spec): Testing users should have more context
This commit is contained in:
parent
bb92b3f675
commit
98bbdf71f4
1 changed files with 166 additions and 163 deletions
|
@ -4,11 +4,13 @@ require_once('src/ReadOnlyTrait.php');
|
||||||
use MichaelAChrisco\ReadOnly\ReadOnlyException;
|
use MichaelAChrisco\ReadOnly\ReadOnlyException;
|
||||||
use MichaelAChrisco\ReadOnly\ReadOnlyTrait;
|
use MichaelAChrisco\ReadOnly\ReadOnlyTrait;
|
||||||
|
|
||||||
class User extends Illuminate\Database\Eloquent\Model {
|
class User extends Illuminate\Database\Eloquent\Model
|
||||||
|
{
|
||||||
use ReadOnlyTrait;
|
use ReadOnlyTrait;
|
||||||
}
|
}
|
||||||
|
|
||||||
describe("User", function () {
|
describe("User", function () {
|
||||||
|
context("When User calls unsupported method", function () {
|
||||||
describe("::create()", function () {
|
describe("::create()", function () {
|
||||||
it("is expected to throw ReadOnlyException", function () {
|
it("is expected to throw ReadOnlyException", function () {
|
||||||
expect(
|
expect(
|
||||||
|
@ -163,6 +165,7 @@ describe("User", function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
class MockModel
|
class MockModel
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue