"""Test suite for Checkpoint API endpoint."""
from pytest import mark

from formsflow_documents import create_app


@mark.describe("Initialize Checkpoint API")
def test_checkpoint_api():
    """Assert that checkpoint API response."""
    flask_app = create_app(run_mode="testing")

    with flask_app.test_client() as client:
        response = client.get("/checkpoint")
        assert response.status_code == 200
        assert response.json == {"message": "Welcome to formsflow.ai documents API"}


def test_checkpoint_test_api(client):
    """Assert that checkpoint API status code."""
    response = client.get("/checkpoint")
    assert response.status_code == 200
