Commit 2210ec90 authored by Shinya Maeda's avatar Shinya Maeda

Fix tests for Drop filename enforcement

parent 24dee365
......@@ -19,7 +19,7 @@ describe Ci::CreateTraceArtifactService do
it 'creates trace artifact' do
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
context 'when the job has already had trace artifact' do
......
......@@ -50,22 +50,6 @@ describe JobArtifactUploader do
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
let(:file) do
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