Skip to content
Snippets Groups Projects
Unverified Commit 2a12eb34 authored by Cam Saul's avatar Cam Saul
Browse files

Test fixes :wrench: [ci drivers]

parent b195e99c
No related merge requests found
......@@ -393,6 +393,8 @@
;;; --------------------------------------------------- Remappings ---------------------------------------------------
(api/defendpoint GET "/card/:token/field/:field-id/remapping/:remapped-id"
"Fetch remapped Field values. This is the same as `GET /api/field/:id/remapping/:remapped-id`, but for use with
embedded Cards."
[token field-id remapped-id value]
{value su/NonBlankString}
(let [unsigned-token (eu/unsign token)
......@@ -401,6 +403,8 @@
(public-api/card-field-remapped-values card-id field-id remapped-id value)))
(api/defendpoint GET "/dashboard/:token/field/:field-id/remapping/:remapped-id"
"Fetch remapped Field values. This is the same as `GET /api/field/:id/remapping/:remapped-id`, but for use with
embedded Dashboards."
[token field-id remapped-id value]
{value su/NonBlankString}
(let [unsigned-token (eu/unsign token)
......
......@@ -326,6 +326,8 @@
(field-remapped-values field-id remapped-field-id value-str))
(api/defendpoint GET "/card/:uuid/field/:field-id/remapping/:remapped-id"
"Fetch remapped Field values. This is the same as `GET /api/field/:id/remapping/:remapped-id`, but for use with public
Cards."
[uuid field-id remapped-id value]
{value su/NonBlankString}
(api/check-public-sharing-enabled)
......@@ -333,6 +335,8 @@
(card-field-remapped-values card-id field-id remapped-id value)))
(api/defendpoint GET "/dashboard/:uuid/field/:field-id/remapping/:remapped-id"
"Fetch remapped Field values. This is the same as `GET /api/field/:id/remapping/:remapped-id`, but for use with public
Dashboards."
[uuid field-id remapped-id value]
{value su/NonBlankString}
(api/check-public-sharing-enabled)
......
......@@ -141,11 +141,11 @@
;; Test that Tables got synced correctly, and row counts are correct
(datasets/expect-with-engine :mongo
[{:rows 75, :active true, :name "categories"}
{:rows 1000, :active true, :name "checkins"}
{:rows 15, :active true, :name "users"}
{:rows 100, :active true, :name "venues"}]
(for [field (db/select [Table :name :active :rows]
[{:active true, :name "categories"}
{:active true, :name "checkins"}
{:active true, :name "users"}
{:active true, :name "venues"}]
(for [field (db/select [Table :name :active]
:db_id (data/id)
{:order-by [:name]})]
(into {} field)))
......@@ -157,7 +157,7 @@
[{:special_type :type/PK, :base_type :type/Integer, :name "_id"}
{:special_type nil, :base_type :type/DateTime, :name "date"}
{:special_type :type/Category, :base_type :type/Integer, :name "user_id"}
{:special_type :type/Category, :base_type :type/Integer, :name "venue_id"}]
{:special_type nil, :base_type :type/Integer, :name "venue_id"}]
[{:special_type :type/PK, :base_type :type/Integer, :name "_id"}
{:special_type nil, :base_type :type/DateTime, :name "last_login"}
{:special_type :type/Name, :base_type :type/Text, :name "name"}
......
......@@ -230,9 +230,8 @@
{:target_table_id (data/id :venues)}
{})
:target (target-field (venues-col :id))
:special_type (if (data/fks-supported?)
:type/FK
:type/Category)
:special_type (when (data/fks-supported?)
:type/FK)
:base_type (data/expected-base-type->actual :type/Integer)
:name (data/format-name "venue_id")
:display_name "Venue ID"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment