This commit is contained in:
Mateusz Gruszczyński
2026-03-13 11:03:13 +01:00
commit 35571df778
132 changed files with 11197 additions and 0 deletions

17
tests/test_api.py Normal file
View File

@@ -0,0 +1,17 @@
from app.models.company import Company
from app.services.sync_service import SyncService
def test_health(client):
response = client.get('/api/health')
assert response.status_code == 200
assert response.json['db'] == 'ok'
def test_api_invoices(auth_client, app):
with app.app_context():
company = Company.query.first()
SyncService(company).run_manual_sync()
response = auth_client.get('/api/invoices')
assert response.status_code == 200
assert 'items' in response.json