Skip to content

Commit 6592e22

Browse files
committed
add test can attribute delete from model
1 parent 2561cc1 commit 6592e22

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/AttributeTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,11 @@
5656
assertDatabaseCount('products', 1);
5757
assertNotEmpty($product->hasAttributeTitle($title));
5858
});
59+
60+
test('test can attribute delete from model', function () {
61+
$product = Product::query()->create(['title' => 'milwad-dev']);
62+
$product->attachAttribute($title = 'role', $value = 'developer');
63+
$product->deleteAttribute($title, $value);
64+
65+
assertDatabaseCount('products', 1);
66+
});

0 commit comments

Comments
 (0)