summaryrefslogtreecommitdiff
path: root/spec/lib/container_registry
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-03 11:42:37 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-03 11:44:16 +0200
commite10dae3e3c2a5fb6077244c72e44c912b7281349 (patch)
treeb7189fb41ba3d99f6fe1fc22071177d6339176d0 /spec/lib/container_registry
parent1a47986b3d7cd8e6d5bdbfbc20a841cf5586f773 (diff)
downloadgitlab-ce-e10dae3e3c2a5fb6077244c72e44c912b7281349.tar.gz
Improve code in container repository path class
Diffstat (limited to 'spec/lib/container_registry')
-rw-r--r--spec/lib/container_registry/path_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/container_registry/path_spec.rb b/spec/lib/container_registry/path_spec.rb
index 1973da65f0a..825c61beeb3 100644
--- a/spec/lib/container_registry/path_spec.rb
+++ b/spec/lib/container_registry/path_spec.rb
@@ -3,6 +3,14 @@ require 'spec_helper'
describe ContainerRegistry::Path do
subject { described_class.new(path) }
+ describe '#nodes' do
+ let(:path) { 'path/to/some/project' }
+
+ it 'splits elements by a forward slash' do
+ expect(subject.nodes).to eq %w[path to some project]
+ end
+ end
+
describe '#components' do
context 'when repository path is valid' do
let(:path) { 'path/to/some/project' }