From 8529177baeb08b96f613148ebef0bf5861d897d1 Mon Sep 17 00:00:00 2001
From: Azul <azul@leap.se>
Date: Thu, 31 Jul 2014 08:53:08 +0200
Subject: respond with 404 and 500 when rendering custom error pages

includes test
---
 test/functional/errors_controller_test.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 test/functional/errors_controller_test.rb

(limited to 'test')

diff --git a/test/functional/errors_controller_test.rb b/test/functional/errors_controller_test.rb
new file mode 100644
index 0000000..e6d2367
--- /dev/null
+++ b/test/functional/errors_controller_test.rb
@@ -0,0 +1,14 @@
+class ErrorsControllerTest < ActionController::TestCase
+
+  def test_not_found_resonds_with_404
+    get 'not_found'
+    assert_response 404
+    assert_template 'errors/not_found'
+  end
+
+  def test_server_error_resonds_with_500
+    get 'server_error'
+    assert_response 500
+    assert_template 'errors/server_error'
+  end
+end
-- 
cgit v1.2.3