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

Add tests for native and nested questions

parent 4ec0364c
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,46 @@
(with-dashboard-cleanup
(-> card-id Card (automagic-analysis {}) valid-dashboard?)))))
(expect
true
(tt/with-temp* [Card [{card-id :id} {:table_id nil
:dataset_query {:native {:query "select * from users"}
:type :native
:database (data/id)}}]]
(with-rasta
(with-dashboard-cleanup
(-> card-id Card (automagic-analysis {}) valid-dashboard?)))))
(expect
true
(tt/with-temp* [Card [{source-id :id} {:table_id (data/id :venues)
:dataset_query {:query {:source_table (data/id :venues)}
:type :query
:database (data/id)}}]
Card [{card-id :id} {:table_id (data/id :venues)
:dataset_query {:query {:filter [:> [:field-id (data/id :venues :price)] 10]
:source_table (str "card__" source-id)}
:type :query
:database -1337}}]]
(with-rasta
(with-dashboard-cleanup
(-> card-id Card (automagic-analysis {}) valid-dashboard?)))))
(expect
true
(tt/with-temp* [Card [{source-id :id} {:table_id nil
:dataset_query {:native {:query "select * from users"}
:type :native
:database (data/id)}}]
Card [{card-id :id} {:table_id (data/id :venues)
:dataset_query {:query {:filter [:> [:field-id (data/id :venues :price)] 10]
:source_table (str "card__" source-id)}
:type :query
:database -1337}}]]
(with-rasta
(with-dashboard-cleanup
(-> card-id Card (automagic-analysis {}) valid-dashboard?)))))
(expect
true
(tt/with-temp* [Card [{card-id :id} {:table_id (data/id :venues)
......
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