Skip to content
Snippets Groups Projects
Commit 02aefd13 authored by Simon Belak's avatar Simon Belak
Browse files

Add tests

parent e64811d1
No related branches found
No related tags found
No related merge requests found
(ns metabase.automagic-dashboards.core-test
(:require [expectations :refer :all]
[metabase.models.table :as table]
[metabase.sync.analyze.classifiers.name :refer :all]))
;; Postfix + pluralization
(expect
:type/TransactionTable
(-> {:name "MY_ORDERS"} table/map->TableInstance infer-entity-type :entity_type))
;; Prefix
(expect
:type/ProductTable
(-> {:name "productcatalogue"} table/map->TableInstance infer-entity-type :entity_type))
;; Don't match in the middle of the name
(expect
:type/GenericTable
(-> {:name "myproductcatalogue"} table/map->TableInstance infer-entity-type :entity_type))
;; Not-match/default
(expect
:type/GenericTable
(-> {:name "foo"} table/map->TableInstance infer-entity-type :entity_type))
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