Skip to content

Business intelligence made simple

Improved tests [skip ci]

Andrew Kane33df62325b78
diff --git a/test/dashboards_test.rb b/test/dashboards_test.rb
index 200be165..e215d2d6 100644
--- a/test/dashboards_test.rb
+++ b/test/dashboards_test.rb
@@ -21,6 +21,10 @@ class DashboardsTest < ActionDispatch::IntegrationTest
dashboard = create_dashboard
delete blazer.dashboard_path(dashboard)
assert_redirected_to blazer.root_path
+
+ assert_raises(ActiveRecord::RecordNotFound) do
+ dashboard.reload
+ end
end
def test_refresh
diff --git a/test/queries_test.rb b/test/queries_test.rb
index 52be2a43..7117106c 100644
--- a/test/queries_test.rb
+++ b/test/queries_test.rb
@@ -37,6 +37,10 @@ class QueriesTest < ActionDispatch::IntegrationTest
query = create_query
delete blazer.query_path(query)
assert_redirected_to blazer.root_path
+
+ assert_raises(ActiveRecord::RecordNotFound) do
+ query.reload
+ end
end
def test_rollback