summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Attali <jeremy.attali@gmail.com>2014-01-25 23:57:37 +0100
committerJeremy Attali <jeremy.attali@gmail.com>2014-01-26 00:06:35 +0100
commit1315cac7c303429bdfc56ef061d98b158bf67b4d (patch)
tree14d9a4df538ad094fd22b5c06b5ccda3907caedd /test
parent9e8dfe7d4290f0150fdef10230cd0ca7a75c9755 (diff)
add error string when widget not rendered
This prevents the cryptic ruby raw string being printed if no rendering template were found. Closes: #307
Diffstat (limited to 'test')
-rw-r--r--test/app_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/app_test.rb b/test/app_test.rb
index 4101e91..da889ff 100644
--- a/test/app_test.rb
+++ b/test/app_test.rb
@@ -137,6 +137,14 @@ class AppTest < Dashing::Test
end
end
+ def test_get_nonexistent_widget
+ with_generated_project do
+ get '/views/nowidget.html'
+ assert_equal 200, last_response.status
+ assert_equal last_response.body, 'Drats! Unable to find a widget file named: nowidget to render.'
+ end
+ end
+
def with_generated_project
source_path = File.expand_path('../../templates', __FILE__)