31 lines
727 B
Ruby
31 lines
727 B
Ruby
![]() |
require 'spec_helper'
|
||
|
|
||
|
describe Ci::JobArtifact do
|
||
|
set(:artifact) { create(:ci_job_artifact) }
|
||
|
|
||
|
describe "Associations" do
|
||
|
it { is_expected.to belong_to(:project) }
|
||
|
it { is_expected.to belong_to(:job) }
|
||
|
end
|
||
|
|
||
|
it { is_expected.to respond_to(:file) }
|
||
|
it { is_expected.to respond_to(:created_at) }
|
||
|
it { is_expected.to respond_to(:updated_at) }
|
||
|
|
||
|
describe '#set_size' do
|
||
|
it 'sets the size' do
|
||
|
expect(artifact.size).to eq(106365)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
describe '#file' do
|
||
|
subject { artifact.file }
|
||
|
|
||
|
context 'the uploader api' do
|
||
|
it { is_expected.to respond_to(:store_dir) }
|
||
|
it { is_expected.to respond_to(:cache_dir) }
|
||
|
it { is_expected.to respond_to(:work_dir) }
|
||
|
end
|
||
|
end
|
||
|
end
|