Sha256: 07a0e7ae2df8756fd516e4f6db9e6c8ebd1bd29e21489469b8f814bf88a9fd00

Contents?: true

Size: 1.22 KB

Versions: 6

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Travis::CLI::Endpoint do
  example 'travis endpoint' do
    run_cli('endpoint').should be_success
    stdout.should be == "https://api.travis-ci.com/\n"
  end

  example 'travis endpoint --pro' do
    run_cli('endpoint', '--pro').should be_success
    stdout.should be == "https://api.travis-ci.com/\n"
  end

  example 'travis endpoint --com' do
    run_cli('endpoint', '--com').should be_success
    stdout.should be == "https://api.travis-ci.com/\n"
  end

  example 'travis endpoint -e http://localhost:3000/' do
    run_cli('endpoint', '-e', 'http://localhost:3000/').should be_success
    stdout.should be == "http://localhost:3000/\n"
  end

  example 'TRAVIS_ENDPOINT=http://localhost:3000/ travis endpoint' do
    ENV['TRAVIS_ENDPOINT'] = 'http://localhost:3000/'
    run_cli('endpoint').should be_success
    stdout.should be == "http://localhost:3000/\n"
  end

  example 'travis endpoint --github' do
    run_cli('endpoint', '--github').should be_success
    stdout.should be == "https://api.github.com\n"
  end

  example 'travis endpoint -i' do
    run_cli('endpoint', '-i').should be_success
    stdout.should be == "API endpoint: https://api.travis-ci.com/\n"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
travis-1.14.0 spec/cli/endpoint_spec.rb
travis-1.13.3 spec/cli/endpoint_spec.rb
travis-1.13.2 spec/cli/endpoint_spec.rb
travis-1.13.1 spec/cli/endpoint_spec.rb
travis-1.13.0 spec/cli/endpoint_spec.rb
travis-1.12.0 spec/cli/endpoint_spec.rb