             (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)))
+            (jobs/enqueue "provision" {:identity "1" :args [type (assoc machine :system-id 1)] :tid nil :env :dev :user nil}) => nil)))
 
 (fact "staging job" 
       (non-sec-app (request :post "/jobs/stage/1")) => (contains {:status 200})

        (s/get-system "1") => {:type "redis"} 
        (p/get-type "redis") => {:classes {:redis {:append true}}}))

#_(def type-req
    (merge {:params (slurp-edn "fixtures/redis-type.edn")}
           (header (request :post "/type") "Content-type" "application/edn")))

; TODO is seems that ring-mock isn't working correctly with '&' distructuing 
#_(fact "type requests"
        (non-sec-app type-req) => {:status 200}
        (provided 
          (p/add-type (slurp-edn "fixtures/redis-type.edn") :type) => nil
          ))

(let [machine {:type "redis" :machine {:host "foo"}} type {:classes {:redis {}}}]
    (fact "provisioning job"
          (non-sec-app (request :post "/jobs/provision/1")) => (contains {:status 200})

        (s/system-exists? "1") => true
        (s/get-system "1")  => {}
        (s/get-system "1" :env)  => :dev
        (jobs/enqueue "reload" {:identity "1" :args [{:system-id 1}] :tid nil :env :dev :user nil}) => nil))
