Commit d30e71b3 authored by Shinya Maeda's avatar Shinya Maeda

Fix tests for Drop filename enforcement

parent 8bf94381
...@@ -19,7 +19,7 @@ describe Ci::CreateTraceArtifactService do ...@@ -19,7 +19,7 @@ describe Ci::CreateTraceArtifactService do
it 'creates trace artifact' do it 'creates trace artifact' do
expect { subject }.to change { Ci::JobArtifact.count }.by(1) expect { subject }.to change { Ci::JobArtifact.count }.by(1)
expect(job.job_artifacts_trace.read_attribute(:file)).to eq('trace.log') expect(job.job_artifacts_trace.read_attribute(:file)).to eq('sample_trace')
end end
context 'when the job has already had trace artifact' do context 'when the job has already had trace artifact' do
......
...@@ -38,22 +38,6 @@ describe JobArtifactUploader do ...@@ -38,22 +38,6 @@ describe JobArtifactUploader do
end end
end end
describe '#filename' do
subject { uploader.filename }
context 'when artifact file_type is archive' do
let(:job_artifact) { create(:ci_job_artifact, :archive) }
it { is_expected.to be_nil }
end
context 'when artifact file_type is trace' do
let(:job_artifact) { create(:ci_job_artifact, :trace) }
it { is_expected.to eq('trace.log') }
end
end
context 'file is stored in valid local_path' do context 'file is stored in valid local_path' do
let(:file) do let(:file) do
fixture_file_upload( fixture_file_upload(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment