From ac4b60d13162c46ec72112f0ef3d315734868d1e Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 19 Nov 2012 14:46:11 +0100 Subject: require authentication for cert download w/ test --- certs/test/functional/certs_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'certs/test/functional') diff --git a/certs/test/functional/certs_controller_test.rb b/certs/test/functional/certs_controller_test.rb index 295515b..9bba8c0 100644 --- a/certs/test/functional/certs_controller_test.rb +++ b/certs/test/functional/certs_controller_test.rb @@ -4,7 +4,14 @@ class CertsControllerTest < ActionController::TestCase setup do end + test "should require login" do + get :show + assert_response :redirect + assert_redirected_to login_url + end + test "should send cert" do + login cert = stub :zipped => "adsf", :zipname => "cert_stub.zip" Cert.expects(:pick_from_pool).returns(cert) get :show -- cgit v1.2.3