Skip to content

Commit 2561cc1

Browse files
committed
add test product has attribute title
1 parent ac1e5e8 commit 2561cc1

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
@@ -48,3 +48,11 @@
4848
assertDatabaseCount('products', 1);
4949
assertNotEmpty($product->hasAttributeValue($value));
5050
});
51+
52+
test('test product has attribute title', function () {
53+
$product = Product::query()->create(['title' => 'milwad-dev']);
54+
$product->attachAttribute($title = 'role', 'developer');
55+
56+
assertDatabaseCount('products', 1);
57+
assertNotEmpty($product->hasAttributeTitle($title));
58+
});

0 commit comments

Comments
 (0)