refactor(catalog): add event date attribute with dynamic options and update related logic
This commit is contained in:
@@ -57,6 +57,18 @@ class CatalogModelsTest extends TestCase
|
||||
$this->assertInstanceOf(AttributeOption::class, $attribute->options()->getRelated());
|
||||
}
|
||||
|
||||
public function test_event_date_is_an_attribute_type_with_dynamic_options(): void
|
||||
{
|
||||
$attribute = new Attribute;
|
||||
$attribute->type = FieldType::EventDate->value;
|
||||
|
||||
$this->assertSame(FieldType::EventDate, $attribute->type);
|
||||
$this->assertTrue($attribute->type->supportsOptions());
|
||||
$this->assertTrue($attribute->type->usesDynamicOptions());
|
||||
$this->assertContains('event_date', FieldType::values());
|
||||
$this->assertInstanceOf(EventDate::class, $attribute->eventDates()->getRelated());
|
||||
}
|
||||
|
||||
public function test_catalog_item_is_the_catalog_root(): void
|
||||
{
|
||||
$item = new CatalogItem;
|
||||
|
||||
Reference in New Issue
Block a user