dev.metalisp.sbt/tests/main.lisp

16 lines
549 B
Common Lisp
Raw Normal View History

2023-11-25 09:59:03 +01:00
(defpackage dev.metalisp.sbt/tests/main
2023-06-29 17:19:12 +02:00
(:use :cl
2023-11-25 09:59:03 +01:00
:dev.metalisp.sbt
2023-06-29 17:19:12 +02:00
:rove))
2023-11-25 09:59:03 +01:00
(in-package :dev.metalisp.sbt/tests/main)
2023-06-29 17:19:12 +02:00
2023-11-25 09:59:03 +01:00
;; NOTE: To run this test file, execute `(asdf:test-system :dev.metalisp.sbt)' in your Lisp.
2024-01-27 21:30:25 +01:00
(deftest test-with-page
(let ((result (with-output-to-string (spinneret:*html*)
(with-page (:title "Example")
(:h2 "Hello World")))))
(testing "Testing with-page macro"
(ok (search "<title>Example</title>" result))
(ok (search "<h2>Hello World</h2>" result)))))