summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-11 09:57:03 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 12:48:16 +0100
commit09a4a5aff8c53dd5930044ddbb285a95ef177d8a (patch)
tree16d4e877364b0d1480f83fd2faffe9cf8c1cfe82 /spec/lib
parent61fb47a43202332fe9ac57847996da929ba42d3f (diff)
downloadgitlab-ce-09a4a5aff8c53dd5930044ddbb285a95ef177d8a.tar.gz
Render only valid paths in artifacts metadata
In this version we will support only relative paths in artifacts metadata. Support for absolute paths will be introduced later.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/ci/build/artifacts/metadata/path_spec.rb8
-rw-r--r--spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb8
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/lib/gitlab/ci/build/artifacts/metadata/path_spec.rb b/spec/lib/gitlab/ci/build/artifacts/metadata/path_spec.rb
index 148d05b5902..3b254c3ce2f 100644
--- a/spec/lib/gitlab/ci/build/artifacts/metadata/path_spec.rb
+++ b/spec/lib/gitlab/ci/build/artifacts/metadata/path_spec.rb
@@ -108,14 +108,14 @@ describe Gitlab::Ci::Build::Artifacts::Metadata::Path do
end
end
- describe '#nodes', path: './test' do
+ describe '#nodes', path: 'test' do
subject { |example| path(example).nodes }
- it { is_expected.to eq 2 }
+ it { is_expected.to eq 1 }
end
- describe '#nodes', path: './test/' do
+ describe '#nodes', path: 'test/' do
subject { |example| path(example).nodes }
- it { is_expected.to eq 2 }
+ it { is_expected.to eq 1 }
end
describe '#metadata' do
diff --git a/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb b/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb
index 36c4851126c..456314768be 100644
--- a/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb
+++ b/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb
@@ -28,8 +28,8 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do
end
end
- describe '#match! other_artifacts_0.1.2' do
- subject { metadata('other_artifacts_0.1.2').match! }
+ describe '#match! other_artifacts_0.1.2/' do
+ subject { metadata('other_artifacts_0.1.2/').match! }
it 'matches correct paths' do
expect(subject.first).
@@ -39,7 +39,7 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do
end
end
- describe '#match! other_artifacts_0.1.2/another-subdirectory' do
+ describe '#match! other_artifacts_0.1.2/another-subdirectory/' do
subject { metadata('other_artifacts_0.1.2/another-subdirectory/').match! }
it 'matches correct paths' do
@@ -52,7 +52,7 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do
describe '#to_path' do
subject { metadata('').to_path }
- it { is_expected.to be_an_instance_of(Gitlab::Ci::Build::Artifacts::Metdata::Path) }
+ it { is_expected.to be_an_instance_of(Gitlab::Ci::Build::Artifacts::Metadata::Path) }
end
describe '#full_version' do