diff options
author | elijah <elijah@riseup.net> | 2016-01-31 14:43:19 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-01-31 15:10:10 -0800 |
commit | e7e16318d056dbd9ec272085487cce6039627b09 (patch) | |
tree | 6ff86c1ae638da1ad620924037ccd41f9418b4b8 /test/functional | |
parent | 16fb1c2bf33ca418a6db06217e286964077a730f (diff) |
remove cert fingerprints for disabled users, so that they cannot send email anymore. closes #7690
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/users_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/v1/certs_controller_test.rb | 8 | ||||
-rw-r--r-- | test/functional/v1/smtp_certs_controller_test.rb | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 70f483e..261f201 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require_relative '../test_helper' class UsersControllerTest < ActionController::TestCase diff --git a/test/functional/v1/certs_controller_test.rb b/test/functional/v1/certs_controller_test.rb index ec34b01..04c1c86 100644 --- a/test/functional/v1/certs_controller_test.rb +++ b/test/functional/v1/certs_controller_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require_relative '../../test_helper' class V1::CertsControllerTest < ActionController::TestCase @@ -21,6 +21,12 @@ class V1::CertsControllerTest < ActionController::TestCase end end + test "fail to create cert when disabled" do + login :enabled? => false + post :create + assert_access_denied + end + test "create unlimited cert" do login effective_service_level: ServiceLevel.new(id: 2) cert = expect_cert('UNLIMITED') diff --git a/test/functional/v1/smtp_certs_controller_test.rb b/test/functional/v1/smtp_certs_controller_test.rb index ba70410..1b03995 100644 --- a/test/functional/v1/smtp_certs_controller_test.rb +++ b/test/functional/v1/smtp_certs_controller_test.rb @@ -24,6 +24,12 @@ class V1::SmtpCertsControllerTest < ActionController::TestCase assert_equal cert.to_s, @response.body end + test "fail to create cert when disabled" do + login :enabled? => false + post :create + assert_access_denied + end + protected def expect_cert(email) |