gitlab-org--gitlab-foss/spec/lib/container_registry/registry_spec.rb

31 lines
650 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-05-17 10:41:47 -04:00
require 'spec_helper'
describe ContainerRegistry::Registry do
let(:path) { nil }
let(:registry) { described_class.new('http://example.com', path: path) }
subject { registry }
it { is_expected.to respond_to(:client) }
it { is_expected.to respond_to(:uri) }
it { is_expected.to respond_to(:path) }
2016-12-15 22:24:05 -05:00
it { expect(subject).not_to be_nil }
2016-05-17 10:41:47 -04:00
context '#path' do
subject { registry.path }
context 'path from URL' do
it { is_expected.to eq('example.com') }
end
context 'custom path' do
let(:path) { 'registry.example.com' }
it { is_expected.to eq(path) }
end
end
end