this test is clj-only and also causes rendering problems for portal due to the #object[] in the rendered test report Signed-off-by: Sean Corfield <sean@corfield.org>
10 lines
421 B
Clojure
10 lines
421 B
Clojure
(ns honey.unhashable-test
|
|
(:require [clojure.test :refer [deftest is]]
|
|
[honey.sql :as sut]))
|
|
|
|
(deftest unhashable-value-509
|
|
(let [unhashable (reify Object
|
|
(toString [_] "unhashable")
|
|
(hashCode [_] (throw (ex-info "Unsupported" {}))))]
|
|
(is (= ["INSERT INTO table VALUES (?)" unhashable]
|
|
(sut/format {:insert-into :table :values [[unhashable]]})))))
|