diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-17 09:41:47 -0500 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-17 09:41:47 -0500 |
commit | a82109eee80bf703ad8e82de2410f490e5fc6d54 (patch) | |
tree | 4417e900b39111123d175303fec9deb71be14e4a /spec/lib/container_registry | |
parent | ac6992ba682de08b79e5ddde08dbf566827e2f07 (diff) | |
download | gitlab-ce-a82109eee80bf703ad8e82de2410f490e5fc6d54.tar.gz |
Add .gitkeep
Diffstat (limited to 'spec/lib/container_registry')
-rw-r--r-- | spec/lib/container_registry/registry_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/lib/container_registry/registry_spec.rb b/spec/lib/container_registry/registry_spec.rb new file mode 100644 index 00000000000..f5f7c3c8bf2 --- /dev/null +++ b/spec/lib/container_registry/registry_spec.rb @@ -0,0 +1,28 @@ +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) } + + it { expect(subject['test']).to_not be_nil } + + 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 |