summaryrefslogtreecommitdiff
path: root/test/clojure_sql/core_test.clj
blob: 1161ecee21aad734327c3ddc57b3ee6e8a9698cc (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
(ns clojure-sql.core-test
  (:refer-clojure :exclude [sort-by])
  (:require [clojure-sql.core :refer :all]
            [midje.sweet :refer :all]))

(fact
  (compile-query nil (table :user))
  => ["SELECT * FROM \"user\""]

  (compile-query nil (-> (table :user) (select '(= :username "george"))))
  => ["SELECT * FROM \"user\" WHERE (\"user\".\"username\" = ?)" "george"])