This commit is contained in:
2025-10-10 18:42:13 +02:00
parent 596f640912
commit 6253de27e2
20 changed files with 1327 additions and 12 deletions

View File

@@ -129,6 +129,26 @@ class TestVersionDetection:
patch('src.utils.constants.ENABLED_FEATURES', ['basic', 'preview', 'text_fitting']):
assert has_text_fitting() is True
def test_has_multiline_text_returns_false_in_free_version(self):
"""Multiline text is not available in free version."""
from src.utils.constants import has_multiline_text
from unittest.mock import patch
# Test free version - need to patch ENABLED_FEATURES since it's computed at import
with patch('src.utils.constants.VERSION_TYPE', 'free'), \
patch('src.utils.constants.ENABLED_FEATURES', ['basic', 'preview']):
assert has_multiline_text() is False
def test_has_multiline_text_returns_true_in_pro_version(self):
"""Multiline text is available in PRO version."""
from src.utils.constants import has_multiline_text
from unittest.mock import patch
# Test full version - need to patch ENABLED_FEATURES since it's computed at import
with patch('src.utils.constants.VERSION_TYPE', 'full'), \
patch('src.utils.constants.ENABLED_FEATURES', ['basic', 'preview', 'multiline_text']):
assert has_multiline_text() is True
class TestRuntimeImportDetection: