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