Skip to content

Commit

Permalink
chore: add tests for model appending
Browse files Browse the repository at this point in the history
  • Loading branch information
mwikala committed Dec 3, 2023
1 parent d3766f2 commit 71289ca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Concerns/HasSqidsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@
expect(Customer::keyFromSqid(sqid: $customer->sqid))
->toBe(1);
});

it('can append the sqid to the model array', function (): void {
$customer = CustomerFactory::new()->create();

expect($customer->toArray())
->toHaveKey('sqid')
->and($customer->toArray()['sqid'])
->toBe($customer->sqid);
});

0 comments on commit 71289ca

Please sign in to comment.