Add tests for btn component
This commit is contained in:
parent
f6c752cf6b
commit
58b24535e6
2 changed files with 29 additions and 1 deletions
|
@ -46,6 +46,7 @@
|
|||
:components
|
||||
((:file "accordion")
|
||||
(:file "alert")
|
||||
(:file "badge"))))
|
||||
(:file "badge")
|
||||
(:file "button"))))
|
||||
:description "Test system for cl-sbt"
|
||||
:perform (test-op (op c) (symbol-call :rove :run c)))
|
||||
|
|
27
tests/component/button.lisp
Normal file
27
tests/component/button.lisp
Normal file
|
@ -0,0 +1,27 @@
|
|||
(defpackage cl-sbt/tests/btn
|
||||
(:use
|
||||
:cl
|
||||
:cl-sbt
|
||||
:rove)
|
||||
(:import-from
|
||||
:cl-sbt/btn
|
||||
:btn
|
||||
:btn-primary
|
||||
:btn-outline-primary))
|
||||
|
||||
(in-package :cl-sbt/tests/btn)
|
||||
|
||||
(deftest test-btn-macro
|
||||
(testing "Testing btn macro"
|
||||
(let ((result (spinneret:with-html-string (btn (:type "primary") "foo"))))
|
||||
(ok (search "class=\"btn btn-primary\"" result)))))
|
||||
|
||||
(deftest test-btn-primary
|
||||
(testing "Testing btn primary"
|
||||
(let ((result (spinneret:with-html-string (btn-primary "foo"))))
|
||||
(ok (search "class=\"btn btn-primary\"" result)))))
|
||||
|
||||
(deftest test-btn-outline-primary
|
||||
(testing "Testing btn outline primary"
|
||||
(let ((result (spinneret:with-html-string (btn-outline-primary "foo"))))
|
||||
(ok (search "class=\"btn btn-outline-primary\"" result)))))
|
Loading…
Add table
Reference in a new issue