Sha256: c78e3e444bb6fe9250a2dcb8dcb3e2a875c742cfb440aa87de3503ba9c030fce

Contents?: true

Size: 955 Bytes

Versions: 119

Compression:

Stored size: 955 Bytes

Contents

require 'spec_helper'

describe Travis::CLI::ApiCommand do
  describe 'enterprise' do
    travis_config_path = ENV['TRAVIS_CONFIG_PATH']

    before do
      ENV['TRAVIS_CONFIG_PATH'] = File.expand_path '../support', File.dirname(__FILE__)
      config = subject.send(:load_file, 'fake_travis_config.yml')
      subject.config = YAML.load(config)

      subject.api_endpoint = 'https://travis-ci-enterprise/api'
      subject.enterprise_name = 'default'
    end

    after do
      ENV['TRAVIS_CONFIG_PATH'] = travis_config_path
    end

    describe '#setup_enterprise' do
      before do
        subject.send(:setup_enterprise)
      end

      it 'keeps verifying peers' do
        subject.insecure.should be_falsey
      end

      it 'uses default CAs' do
        subject.session.ssl.should_not include(:ca_file)
      end

      it 'flags endpoint' do
        subject.endpoint_config.should include('enterprise' => true)
      end
    end
  end
end

Version data entries

119 entries across 119 versions & 2 rubygems

Version Path
travis-1.11.1 spec/cli/api_command_spec.rb
travis-1.11.0 spec/cli/api_command_spec.rb
travis-1.10.1.travis.1341.9 spec/cli/api_command_spec.rb
travis-1.10.1.travis.1321.9 spec/cli/api_command_spec.rb
travis-1.10.1.travis.1312.9 spec/cli/api_command_spec.rb
travis-1.10.1.travis.1311.9 spec/cli/api_command_spec.rb
travis-1.10.1.travis.1305.9 spec/cli/api_command_spec.rb
travis-1.10.0 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1304.9 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1303.9 spec/cli/api_command_spec.rb
travis-1.10.0.pre.rc4 spec/cli/api_command_spec.rb
travis-1.10.0.pre.rc3 spec/cli/api_command_spec.rb
travis-1.10.0.pre.rc2 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1288.9 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1285.9 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1279.9 spec/cli/api_command_spec.rb
travis-1.10.0.pre.rc1 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1254.9 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1236.9 spec/cli/api_command_spec.rb
travis-1.9.2.travis.1224.9 spec/cli/api_command_spec.rb