Skip to content
Snippets Groups Projects
Commit 667cc8f1 authored by Cam Saul's avatar Cam Saul
Browse files

Fix GeoJSON not being downloadable in embeds

parent 8a0b0e33
Branches
Tags
No related merge requests found
......@@ -69,7 +69,7 @@
(context "/email" [] (+auth email/routes))
(context "/embed" [] (+message-only-exceptions embed/routes))
(context "/field" [] (+auth field/routes))
(context "/geojson" [] (+auth geojson/routes))
(context "/geojson" [] geojson/routes)
(context "/ldap" [] (+auth ldap/routes))
(context "/metric" [] (+auth metric/routes))
(context "/notify" [] (+apikey notify/routes))
......
(ns metabase.api.geojson-test
(:require [expectations :refer [expect]]
[metabase
[http-client :as client]
[util :as u]]
[metabase.api.geojson :as geojson-api]
[metabase.test.data.users :refer [user->client]]
[metabase.test.util :as tu]
[metabase.test.util.log :as tu.log]
[metabase.util :as u]
[schema.core :as s]))
(def ^:private ^String test-geojson-url
......@@ -104,6 +106,13 @@
(tu/with-temporary-setting-values [custom-geojson test-custom-geojson]
((user->client :rasta) :get 200 "geojson/middle-earth")))
;; should be able to fetch the GeoJSON even if you aren't logged in
(expect
{:type "Point"
:coordinates [37.77986 -122.429]}
(tu/with-temporary-setting-values [custom-geojson test-custom-geojson]
(client/client :get 200 "geojson/middle-earth")))
;; try fetching an invalid key; should fail
(expect
"Invalid custom GeoJSON key: invalid-key"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment