From 937fcce2dcca8010dbe8e9e26df954cb1330c1e0 Mon Sep 17 00:00:00 2001 From: Sven Dahlstrand Date: Mon, 27 Apr 2015 00:43:59 +0200 Subject: Pass `status` option to `send_file` and make sure a 404 is returned. --- test/app_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/app_test.rb b/test/app_test.rb index 4101e91..4acb27a 100644 --- a/test/app_test.rb +++ b/test/app_test.rb @@ -129,6 +129,13 @@ class AppTest < Dashing::Test end end + def test_get_nonexistent_dashboard_sends_file_with_404_status + with_generated_project do + app.any_instance.expects(:send_file).with(anything, has_entry(:status, 404)) + get '/nodashboard' + end + end + def test_get_widget with_generated_project do get '/views/meter.html' -- cgit v1.2.3