diff options
author | azul <azul@leap.se> | 2014-07-14 07:52:12 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-07-14 07:52:12 +0200 |
commit | 07b141f3d677e993f02380b455738b20b9f0fe42 (patch) | |
tree | 553111ac07f6100738f29ddc7165fa800852f224 /test/integration/api | |
parent | 1c7308207a9ab46cfb60c72aceaee2b3c82281fe (diff) | |
parent | 3bbfdf29bbc40432c21e34fe84060cf9ae70273f (diff) |
Merge pull request #175 from azul/feature/view-for-valid-certs
Feature/view for valid certs
Diffstat (limited to 'test/integration/api')
-rw-r--r-- | test/integration/api/smtp_cert_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/integration/api/smtp_cert_test.rb b/test/integration/api/smtp_cert_test.rb index f72362d..7697e44 100644 --- a/test/integration/api/smtp_cert_test.rb +++ b/test/integration/api/smtp_cert_test.rb @@ -33,8 +33,10 @@ class SmtpCertTest < ApiIntegrationTest assert_text_response cert = OpenSSL::X509::Certificate.new(get_response.body) fingerprint = OpenSSL::Digest::SHA1.hexdigest(cert.to_der).scan(/../).join(':') - today = DateTime.now.to_date.to_s - assert_equal({fingerprint => today}, @user.reload.identity.cert_fingerprints) + expiry = APP_CONFIG[:client_cert_lifespan].months.from_now.utc.midnight + expiry_string = expiry.to_date.to_s + fingerprints = {fingerprint => expiry_string} + assert_equal fingerprints, @user.reload.identity.cert_fingerprints end test "fetching smtp certs requires email account" do |