     [celestial.jobs :as jobs]
     [celestial.persistency.systems :as s] 
     [celestial.persistency :as p]))
-
-; TODO is seems that ring-mock isn't working correctly with '&' distructuing 
-#_(def host-req 
-    (merge {:params redis-prox-spec}
-           (header (request :post "/registry/host") "Content-type" "application/edn")))
 
 (def non-sec-app (app false))
 

            (s/get-system "1")  => machine
            (s/get-system "1" :env)  => :dev
            (p/get-type "redis") => type
            (jobs/enqueue "provision" {:identity "1" :args [type (assoc machine :system-id 1)] :tid nil :env :dev}) => nil)))

(fact "staging job" 
      (non-sec-app (request :post "/jobs/stage/1")) => (contains {:status 200})

        (p/get-type "redis") => {:puppet-module "bar"}
        (s/get-system "1") => {:type "redis"}
        (s/get-system "1" :env)  => :dev
        (jobs/enqueue "stage" {:identity "1" :args [{:puppet-module "bar"} {:system-id 1 :type "redis"}] :tid nil :env :dev :user nil}) => nil))

(fact "creation job"
      (non-sec-app (request :post "/jobs/create/1"))  => (contains {:status 200})
