diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-05-29 10:58:20 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-05-31 22:56:18 +0300 |
commit | 8a9a62e3294d92f4e70be6f427c17241a2b7a232 (patch) | |
tree | 2337d1455c8fb9ebadbe73e872dbdc388a627315 /spec/serializers/build_artifact_entity_spec.rb | |
parent | 68569584b728ac2dd5100593e9db302f362994f5 (diff) |
Incorporate review
Diffstat (limited to 'spec/serializers/build_artifact_entity_spec.rb')
-rw-r--r-- | spec/serializers/build_artifact_entity_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/serializers/build_artifact_entity_spec.rb b/spec/serializers/build_artifact_entity_spec.rb index b4eef20d6a6..a2e24ae1535 100644 --- a/spec/serializers/build_artifact_entity_spec.rb +++ b/spec/serializers/build_artifact_entity_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe BuildArtifactEntity do - let(:job) { create(:ci_build, name: 'test:job') } + let(:job) { create(:ci_build, name: 'test:job', artifacts_expire_at: 1.hour.from_now) } let(:entity) do described_class.new(job, request: double) @@ -14,9 +14,19 @@ describe BuildArtifactEntity do expect(subject[:name]).to eq 'test:job' end - it 'contains path to the artifacts' do + it 'exposes information about expiration of artifacts' do + expect(subject).to include(:expired, :expire_at) + end + + it 'contains paths to the artifacts' do expect(subject[:path]) .to include "jobs/#{job.id}/artifacts/download" + + expect(subject[:keep_path]) + .to include "jobs/#{build.id}/artifacts/keep" + + expect(subject[:browse_path]) + .to include "jobs/#{build.id}/artifacts/browse" end end end |