debian-mirror-gitlab/spec/lib/container_registry/registry_spec.rb

31 lines
657 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2016-06-02 11:05:42 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe ContainerRegistry::Registry do
2016-06-02 11:05:42 +05:30
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) }
2017-08-17 22:00:37 +05:30
it { expect(subject).not_to be_nil }
2016-06-02 11:05:42 +05:30
2020-03-13 15:44:24 +05:30
describe '#path' do
2016-06-02 11:05:42 +05:30
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