(ns brainiac.test.plugins.twitter-search
  (:use [brainiac.plugins.twitter-search]
        [clojure.test]))

(def twitter-json (java.io.ByteArrayInputStream. (.getBytes (slurp "test/brainiac/test/data/twitter.json"))))

(deftest test-transform
  (let [result (transform twitter-json)]
    (testing "sets name"
      (is (= "twitter-search" (:name result))))
    (testing "sets data"
      (is (= (dissoc (first (:data result)) :time)
           {
              :name "hav u seen ?"
              :handle "Rutzen__"
              :text "o Brainiac \u00e9 meio babac\u00e3o"
              :profile_image_url ""
            }
       )))))

(ns brainiac.test.plugins.twitter-search
  (:use [brainiac.plugins.twitter-search]
        [clojure.test]))

(def twitter-json (java.io.ByteArrayInputStream. (.getBytes (slurp "test/brainiac/test/data/twitter.json"))))

(deftest test-transform
  (let [result (transform twitter-json)]
    (testing "sets name"
      (is (= "twitter-search" (:name result))))
    (testing "sets data"
      (is (= (dissoc (first (:data result)) :time)
           {
              :name "hav u seen ?"
              :handle "Rutzen__"
              :text "o Brainiac \u00e9 meio babac\u00e3o"
              :profile_image_url ""
            }
       )))))
