diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_ext_githubpages.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_ext_githubpages.py b/tests/test_ext_githubpages.py index 21b101b73..450a25498 100644 --- a/tests/test_ext_githubpages.py +++ b/tests/test_ext_githubpages.py @@ -15,3 +15,18 @@ import pytest def test_githubpages(app, status, warning): app.builder.build_all() assert (app.outdir / '.nojekyll').exists() + assert not (app.outdir / 'CNAME').exists() + + +@pytest.mark.sphinx('html', testroot='ext-githubpages', confoverrides={'html_baseurl': 'https://sphinx-doc.github.io'}) +def test_no_cname_for_github_io_domain(app, status, warning): + app.builder.build_all() + assert (app.outdir / '.nojekyll').exists() + assert not (app.outdir / 'CNAME').exists() + + +@pytest.mark.sphinx('html', testroot='ext-githubpages', confoverrides={'html_baseurl': 'https://sphinx-doc.org'}) +def test_cname_for_custom_domain(app, status, warning): + app.builder.build_all() + assert (app.outdir / '.nojekyll').exists() + assert (app.outdir / 'CNAME').text() == 'sphinx-doc.org' |