Commit b267b3eb authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Adjust change_access_spec.rb conflict

parent 7d8d774d
......@@ -166,10 +166,8 @@ describe Gitlab::Checks::ChangeAccess do
end
context 'LFS integrity check' do
it 'fails if any LFS blobs are missing' do
allow_any_instance_of(Gitlab::Checks::LfsIntegrity).to receive(:objects_missing?).and_return(true)
let(:blob_object) { project.repository.blob_at_branch('lfs', 'files/lfs/lfs_object.iso') }
<<<<<<< HEAD
before do
allow_any_instance_of(Gitlab::Git::RevList).to receive(:new_objects) do |&lazy_block|
lazy_block.call([blob_object.id])
......@@ -182,15 +180,19 @@ describe Gitlab::Checks::ChangeAccess do
subject
end
=======
expect { subject.exec }.to raise_error(Gitlab::GitAccess::UnauthorizedError, /LFS objects are missing/)
>>>>>>> upstream/master
end
it 'succeeds if LFS objects have already been uploaded' do
allow_any_instance_of(Gitlab::Checks::LfsIntegrity).to receive(:objects_missing?).and_return(false)
context 'with LFS enabled' do
before do
allow(project).to receive(:lfs_enabled?).and_return(true)
end
context 'deletion' do
let(:changes) { { oldrev: oldrev, ref: ref } }
it 'skips integrity check' do
expect_any_instance_of(Gitlab::Git::RevList).not_to receive(:new_objects)
<<<<<<< HEAD
subject
end
end
......@@ -581,9 +583,6 @@ describe Gitlab::Checks::ChangeAccess do
.and_call_original
expect { subject }.not_to raise_error
end
=======
expect { subject.exec }.not_to raise_error
>>>>>>> upstream/master
end
end
end
......
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