Initial Kit project with PostgreSQL, HTMX, Hiccup, and Tailwind

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 11:45:09 +01:00
co-authored by Claude Opus 4.6
commit c1f386ef44
37 changed files with 1920 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
(ns pmagnus.elprice.core-test
(:require
[pmagnus.elprice.test-utils :as utils]
[clojure.test :refer :all]))
(deftest example-test
(is (= 1 2)))
+32
View File
@@ -0,0 +1,32 @@
(ns pmagnus.elprice.test-utils
(:require
[pmagnus.elprice.core :as core]
[peridot.core :as p]
[byte-streams :as bs]
[integrant.repl.state :as state]))
(defn system-state
[]
(or @core/system state/system))
(defn system-fixture
[]
(fn [f]
(when (nil? (system-state))
(core/start-app {:opts {:profile :test}}))
(f)
(core/stop-app)))
(defn get-response [ctx]
(-> ctx
:response
(update :body (fnil bs/to-string ""))))
(defn GET [app path params headers]
(-> (p/session app)
(p/request path
:request-method :get
:content-type "application/edn"
:headers headers
:params params)
(get-response)))
@@ -0,0 +1,13 @@
(ns pmagnus.elprice.web.request-test
(:require [clojure.test :refer [deftest testing is use-fixtures]]
[pmagnus.elprice.test-utils :refer [system-state system-fixture GET]]))
(use-fixtures :once (system-fixture))
(deftest health-request-test []
(testing "happy path"
(let [handler (:handler/ring (system-state))
params {}
headers {}
response (GET handler "/api/health" params headers)]
(is (= 200 (:status response))))))