|
| 1 | +# Cloud Foundry Java Buildpack |
| 2 | +# Copyright 2013-2017 the original author or authors. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +require 'spec_helper' |
| 17 | +require 'component_helper' |
| 18 | +require 'java_buildpack/framework/client_certificate_mapper' |
| 19 | + |
| 20 | +describe JavaBuildpack::Framework::ClientCertificateMapper do |
| 21 | + include_context 'component_helper' |
| 22 | + |
| 23 | + it 'always detects' do |
| 24 | + expect(component.detect).to eq("client-certificate-mapper=#{version}") |
| 25 | + end |
| 26 | + |
| 27 | + it 'adds the jar to the additional libraries during compile', |
| 28 | + cache_fixture: 'stub-client-certificate-mapper.jar' do |
| 29 | + |
| 30 | + component.compile |
| 31 | + |
| 32 | + expect(sandbox + "client_certificate_mapper-#{version}.jar").to exist |
| 33 | + expect(additional_libraries).to include(sandbox + "client_certificate_mapper-#{version}.jar") |
| 34 | + end |
| 35 | + |
| 36 | + it 'adds the jar to the additional libraries during release', |
| 37 | + cache_fixture: 'stub-client-certificate-mapper.jar' do |
| 38 | + |
| 39 | + component.release |
| 40 | + |
| 41 | + expect(additional_libraries).to include(sandbox + "client_certificate_mapper-#{version}.jar") |
| 42 | + end |
| 43 | + |
| 44 | +end |
0 commit comments