Skip to content

Commit d50d300

Browse files
committed
add test can delete all attributes of one model
1 parent 6592e22 commit d50d300

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/AttributeTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@
6464

6565
assertDatabaseCount('products', 1);
6666
});
67+
68+
test('test can delete all attributes of one model', function () {
69+
$product = Product::query()->create(['title' => 'milwad-dev']);
70+
$product->attachAttribute('role', 'developer');
71+
$product->attachAttribute('stack', 'laravel');
72+
$product->deleteAllAttribute();
73+
74+
assertDatabaseCount('products', 1);
75+
});

0 commit comments

Comments
 (0)