Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/snapshots/goodbye-cruel-world.snapshot.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Johnathan Irvin is a software engineer and researcher based in the Lehigh Valley, PA area.">
<meta name="description" content="Johnathan Irvin is a software engineer and researcher based on planet Earth, serving the local solar system. You know, because remote work is a thing, and so is latency.">
<meta name="keywords" content="Vue,JavaScript,HTML,CSS,Python,VueJS,Bootstrap,C#,Engineer,Software,Coding,Development">
<meta name="author" content="Johnathan Irvin">
<link rel="shortcut icon" href="/static/favicon.ico">
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/hello-world.snapshot.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Johnathan Irvin is a software engineer and researcher based in the Lehigh Valley, PA area.">
<meta name="description" content="Johnathan Irvin is a software engineer and researcher based on planet Earth, serving the local solar system. You know, because remote work is a thing, and so is latency.">
<meta name="keywords" content="Vue,JavaScript,HTML,CSS,Python,VueJS,Bootstrap,C#,Engineer,Software,Coding,Development">
<meta name="author" content="Johnathan Irvin">
<link rel="shortcut icon" href="/static/favicon.ico">
Expand Down
48 changes: 48 additions & 0 deletions tests/test_integrations/test_document.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (c) 2022 Johnathan P. Irvin
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import pytest


def test_document_found(client) -> None:
"""
Test that the main document can be found.

Args:
client (test_client): The test client for the Flask application.
"""
assert client.get("/").status_code == 200

@pytest.mark.parametrize("name, content", [
("viewport", "width=device-width, initial-scale=1"),
("description", "Johnathan Irvin is a software engineer and researcher based on planet Earth, serving the local solar system. You know, because remote work is a thing, and so is latency."),
("keywords", "Vue,JavaScript,HTML,CSS,Python,VueJS,Bootstrap,C#,Engineer,Software,Coding,Development"),
("author", "Johnathan Irvin"),
])
def test_document_meta_element(name: str, content: str, client) -> None:
"""
Test that the document has the correct meta elements.

Args:
name (str): The name of the meta element.
content (str): The content of the meta element.
client (test_client): The test client for the Flask application.
"""
assert client.get('/').data.decode().find(f"<meta name=\"{name}\" content=\"{content}\">") > 0
File renamed without changes.
2 changes: 1 addition & 1 deletion website/templates/document.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ html
block meta
meta(charset="utf-8")
meta(name="viewport", content="width=device-width, initial-scale=1")
meta(name="description", content="Johnathan Irvin is a software engineer and researcher based in the Lehigh Valley, PA area.")
meta(name="description", content="Johnathan Irvin is a software engineer and researcher based on planet Earth, serving the local solar system. You know, because remote work is a thing, and so is latency.")
meta(name="keywords", content="Vue,JavaScript,HTML,CSS,Python,VueJS,Bootstrap,C#,Engineer,Software,Coding,Development")
meta(name="author", content="Johnathan Irvin")

Expand Down