"""Snapshot tests for Bible verse text via bolls.life API.

Uses syrupy for snapshot comparison.  Pass --snapshot-update to regenerate.

Because these tests hit an external API, they skip gracefully when the
network is unreachable or bolls.life returns an error.
"""

from __future__ import annotations

import pytest

from accordance_parser.bible_api import get_verse


@pytest.mark.snapshot
def test_genesis_1_1_kjv(snapshot):
    result = get_verse("Genesis 1:1", "KJV")
    assert result is not None, "bolls.life returned nothing — network down?"
    assert result.text == snapshot


@pytest.mark.snapshot
def test_john_3_16_kjv(snapshot):
    result = get_verse("John 3:16", "KJV")
    assert result is not None, "bolls.life returned nothing — network down?"
    assert result.text == snapshot


@pytest.mark.snapshot
def test_psalm_23_1_kjv(snapshot):
    result = get_verse("Psalms 23:1", "KJV")
    assert result is not None, "bolls.life returned nothing — network down?"
    assert result.text == snapshot


@pytest.mark.snapshot
def test_genesis_1_1_esv(snapshot):
    result = get_verse("Genesis 1:1", "ESV")
    assert result is not None, "bolls.life returned nothing — network down?"
    assert result.text == snapshot


@pytest.mark.snapshot
def test_john_1_1_esv(snapshot):
    result = get_verse("John 1:1", "ESV")
    assert result is not None, "bolls.life returned nothing — network down?"
    assert result.text == snapshot
