mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-24 12:06:11 +10:00
Use AR callbacks as suggested by:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12744656
This commit is contained in:
@@ -476,13 +476,17 @@ describe Ci::API::API do
|
||||
|
||||
describe 'DELETE /builds/:id/artifacts' do
|
||||
let(:build) { create(:ci_build, :artifacts) }
|
||||
before { delete delete_url, token: build.token }
|
||||
|
||||
before do
|
||||
delete delete_url, token: build.token
|
||||
build.reload
|
||||
end
|
||||
|
||||
it 'should remove build artifacts' do
|
||||
expect(response).to have_http_status(200)
|
||||
expect(build.artifacts_file.exists?).to be_falsy
|
||||
expect(build.artifacts_metadata.exists?).to be_falsy
|
||||
expect(build.artifacts_size).to be_falsy
|
||||
expect(build.artifacts_size).to eq(0)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user