32 lines
791 B
Swift
32 lines
791 B
Swift
import Elementary
|
|
import Foundation
|
|
import Testing
|
|
|
|
@testable import WebsiteLibrary
|
|
|
|
@Suite(
|
|
"NotFoundPage page",
|
|
.tags(.page)
|
|
)
|
|
struct NotFoundPageTests {
|
|
|
|
// MARK: Functional tests
|
|
|
|
@Test
|
|
func `renders its markup`() {
|
|
let html = NotFoundPage(
|
|
locale: .init(identifier: "en")
|
|
).render()
|
|
|
|
#expect(html.contains("<!DOCTYPE html>"))
|
|
#expect(html.contains(#"lang="en""#))
|
|
#expect(html.contains("Page Not Found"))
|
|
#expect(html.contains("Sorry, but the page you were trying to view does not exist."))
|
|
#expect(html.contains("/css/shared.css"))
|
|
#expect(html.contains("/css/not-found.css"))
|
|
#expect(html.contains("/js/not-found.js"))
|
|
#expect(html.contains("/js/shared.js"))
|
|
}
|
|
|
|
}
|