Sha256: 03eb1c0958bc9d5d1d7b60eefa53ce910b159a1c53af31a5735617b18d4c6b25

Contents?: true

Size: 779 Bytes

Versions: 12

Compression:

Stored size: 779 Bytes

Contents

describe Circleci::Bundle::Update::Pr do
  describe '.github_host' do
    subject { Circleci::Bundle::Update::Pr.send(:github_host) }
    after { ENV['CIRCLE_REPOSITORY_URL'] = nil }

    context 'given git@github.com:masutaka/compare_linker.git' do
      before { ENV['CIRCLE_REPOSITORY_URL'] = 'git@github.com:masutaka/compare_linker.git' }
      it { is_expected.to eq 'github.com' }
    end

    context 'given https://github.com/masutaka/circleci-bundle-update-pr.git' do
      before { ENV['CIRCLE_REPOSITORY_URL'] = 'https://github.com/masutaka/circleci-bundle-update-pr.git' }
      it { is_expected.to eq 'github.com' }
    end

    context 'given nil' do
      before { ENV['CIRCLE_REPOSITORY_URL'] = nil }
      it { is_expected.to eq 'github.com' }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
circleci-bundle-update-pr-1.14.3 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.14.2 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.14.1 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.14.0 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.13.0 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.12.0 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.11.3 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.11.2 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.11.1 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.11.0 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.10.0 spec/circleci/bundle/update/pr_spec.rb
circleci-bundle-update-pr-1.9.1 spec/circleci/bundle/update/pr_spec.rb