from core.domains.plant.entity.plant_entity import PlantCategoryEntity
from core.domains.plant.enum.plant_enum import PlantCategoryEnum
from core.domains.plant.repository.plant_repository import PlantRepository


def test_repo_get_plant_categories(create_plant_cateroies):
    result = PlantRepository().get_plant_categories()

    assert isinstance(result, list)
    assert isinstance(result[0], PlantCategoryEntity)
    assert result[0].name == PlantCategoryEnum.HOUSE_PLANT.value
    assert len(result) == len(create_plant_cateroies)
