summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-02 17:42:37 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-04 08:50:12 -0500
commit0f58eb6bde35009b69ef871534d9ff80fc38bbf7 (patch)
tree0a5065d9fc05822a81a9379f5a6a64f8105f9503 /spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
parent4faa65d8381f3e1e45bdf3a9bc9785b588891b66 (diff)
downloadgitlab-ce-0f58eb6bde35009b69ef871534d9ff80fc38bbf7.tar.gz
Add artifact file page that uses the blob viewerdm-artifact-blob-viewer
Diffstat (limited to 'spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb b/spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
index abc93e1b44a..3b905611467 100644
--- a/spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
+++ b/spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb
@@ -135,6 +135,17 @@ describe Gitlab::Ci::Build::Artifacts::Metadata::Entry do
subject { |example| path(example).nodes }
it { is_expected.to eq 4 }
end
+
+ describe '#blob' do
+ let(:file_entry) { |example| path(example) }
+ subject { file_entry.blob }
+
+ it 'returns a blob representing the entry data' do
+ expect(subject).to be_a(Blob)
+ expect(subject.path).to eq(file_entry.path)
+ expect(subject.size).to eq(file_entry.metadata[:size])
+ end
+ end
end
describe 'non-existent/', path: 'non-existent/' do