       ;; Cartesian line validation isn't supported yet. See CMR-1172
       (assert-valid-spatial
         :cartesian
+        "CARTESIAN" 
         [(l/ords->line-string :cartesian [180 0, -180 0])]))
 
     (testing "bounding box"
       (assert-invalid-spatial
         :geodetic
+        "GEODETIC" 
         [(m/mbr -180 45 180 46)]
         ["Spatial validation error: The bounding rectangle north value [45] was less than the south value [46]"]))))
 

              (select-keys response [:status :errors])))))

   (testing "through ingest API"
     (let [coll (d/ingest "PROV1" (dc/collection coll-attributes) {:format metadata-format})
           response (d/ingest "PROV1" (dg/granule coll gran-attributes) {:format metadata-format
                                                                         :allow-failure? true})]
       (is (= {:status 422
               :errors [{:path field-path
                         :errors errors}]}

(ns cmr.system-int-test.ingest.granule-validation-test
  "CMR Ingest granule validation integration tests"
  (:require 
    [clj-time.core :as t]
    [clj-time.format :as tf ]
    [clojure.test :refer :all]
    [cmr.common.time-keeper :as tk]
    [cmr.common.util :refer [are2]]
    [cmr.ingest.services.messages :as msg]
    [cmr.spatial.line-string :as l]
    [cmr.spatial.mbr :as m]
    [cmr.spatial.point :as p]
    [cmr.spatial.polygon :as poly]
    [cmr.system-int-test.data2.collection :as dc]
    [cmr.system-int-test.data2.core :as d]
    [cmr.system-int-test.data2.granule :as dg]
    [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c]
    [cmr.system-int-test.utils.dev-system-util :as dev-sys-util]
    [cmr.system-int-test.utils.ingest-util :as ingest]
    [cmr.system-int-test.utils.url-helper :as url]
    [cmr.umm.umm-granule :as umm-g]
    [cmr.umm.umm-spatial :as umm-s]))

(use-fixtures :each (ingest/reset-fixture {"provguid1" "PROV1" "provguid2" "PROV2"}))

