diff options
author | NavaL <ayoyo@thoughtworks.com> | 2016-07-14 15:44:07 +0200 |
---|---|---|
committer | NavaL <ayoyo@thoughtworks.com> | 2016-07-14 15:44:07 +0200 |
commit | e3c2cb91dfef5c39c608b967e702e9de977d1bd2 (patch) | |
tree | 154dc28dd986bd6e0a48e933c5da46994ffaa0cb /test/integration/api/cert_test.rb | |
parent | e2f19bcfb6dbce77746c2d61715340525b29a592 (diff) | |
parent | f09e6ec1337962ab279f021a6a6d0ff30479ebe0 (diff) |
Merge branch 'develop' of https://github.com/leapcode/leap_web into feature/expose_admin_in_api
Diffstat (limited to 'test/integration/api/cert_test.rb')
-rw-r--r-- | test/integration/api/cert_test.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/integration/api/cert_test.rb b/test/integration/api/cert_test.rb index 772901d..289d3c6 100644 --- a/test/integration/api/cert_test.rb +++ b/test/integration/api/cert_test.rb @@ -5,7 +5,7 @@ class CertTest < ApiIntegrationTest test "retrieve eip cert" do login - get '/1/cert', {}, RACK_ENV + get cert_url, {}, RACK_ENV assert_text_response assert_response_includes "BEGIN RSA PRIVATE KEY" assert_response_includes "END RSA PRIVATE KEY" @@ -14,13 +14,13 @@ class CertTest < ApiIntegrationTest end test "fetching certs requires login by default" do - get '/1/cert', {}, RACK_ENV + get cert_url, {}, RACK_ENV assert_login_required end test "retrieve anonymous eip cert" do with_config allow_anonymous_certs: true do - get '/1/cert', {}, RACK_ENV + get cert_url, {}, RACK_ENV assert_text_response assert_response_includes "BEGIN RSA PRIVATE KEY" assert_response_includes "END RSA PRIVATE KEY" @@ -28,4 +28,9 @@ class CertTest < ApiIntegrationTest assert_response_includes "END CERTIFICATE" end end + + def cert_url + "/#{api_version}/cert" + end + end |