from unittest.mock import Mock

from src.operators.preset_ops import TEXT_TEXTURE_OT_clear_preset_search


def test_clear_preset_search_resets_query():
    props = Mock()
    props.preset_search_query = "Glow"
    
    context = Mock()
    context.scene.text_texture_props = props
    
    op = TEXT_TEXTURE_OT_clear_preset_search()
    result = op.execute(context)
    
    assert result == {'FINISHED'}
    assert props.preset_search_query == ""
