Welcome to mirror list, hosted at ThFree Co, Russian Federation.

job_artifact_file_spec.rb « ci « entities « api « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9e4ec272518aad50888914f798384c793c938d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe API::Entities::Ci::JobArtifactFile do
  let(:artifact_file) { instance_double(JobArtifactUploader, filename: 'ci_build_artifacts.zip', cached_size: 42) }
  let(:entity) { described_class.new(artifact_file) }

  subject { entity.as_json }

  it 'returns the filename' do
    expect(subject[:filename]).to eq('ci_build_artifacts.zip')
  end

  it 'returns the size' do
    expect(subject[:size]).to eq(42)
  end
end