 (deftest test-fetch-code
   (testing "Test issuing http get for auth-code from oauth provider."
    (reset-channels)
-   (a/go (a/>!! code-chan (:code final-state-map)))
+   (a/go (a/>! code-chan (:code final-state-map)))
    (with-redefs [clj-http.client/get (constantly (:token-response final-state-map))]
       (is (= final-state-map (fetch-code final-state-map))))))
 

  (drain! code-chan)
  (drain! interaction-chan))

(defn put-values-on-channels
  []
  "Put a value on each channel."
     (a/>!! code-chan (:code final-state-map)) 
     )

(defn reset
  "Reset the state of our app."
  [f]

  (deftest test-request-access-to-data
    (testing "Build auth url and fetch code."
    (reset-channels)
    (a/go (a/>! code-chan (:code final-state-map)))
        (with-redefs [clj-http.client/get (constantly (:token-response final-state-map))]
       (is (= final-state-map) (update-in  (request-access-to-data (dissoc final-state-map :code)) [:token-response :request-time] (fn [x] 0)))))) 

