import pytest


def test_equipments_index(client, app):
    """L'index des équipements répond correctement."""
    from tests.factories.user import UserFactory
    from flask_login import login_user

    with app.test_request_context():
        user = UserFactory()
        login_user(user)
        response = client.get('/equipments/')
    assert response.status_code in (200, 302)
