diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-02-15 05:21:17 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-02-19 10:01:25 +0000 |
commit | d4dfa342c1f5a916d325e198ff19d3f702bfb3d9 (patch) | |
tree | d41ef1cd19f694aaedd0f5fc168684b6fda18317 /spec/lib | |
parent | f7c662c733a2a24c044c1f0bad03cfc63f704258 (diff) | |
download | gitlab-ce-d4dfa342c1f5a916d325e198ff19d3f702bfb3d9.tar.gz |
Avoid slow File Lock checks when not used
Also avoid double commit lookup during file lock check by reusing
memoized commits.
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/checks/change_access_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/checks/change_access_spec.rb b/spec/lib/gitlab/checks/change_access_spec.rb index 475b5c5cfb2..b49ddbfc780 100644 --- a/spec/lib/gitlab/checks/change_access_spec.rb +++ b/spec/lib/gitlab/checks/change_access_spec.rb @@ -190,7 +190,7 @@ describe Gitlab::Checks::ChangeAccess do context 'with LFS not enabled' do it 'skips the validation' do - expect_any_instance_of(described_class).not_to receive(:lfs_file_locks_validation) + expect_any_instance_of(Gitlab::Checks::CommitCheck).not_to receive(:validate) subject.exec end @@ -207,7 +207,7 @@ describe Gitlab::Checks::ChangeAccess do end end - context 'when change is sent by the author od the lock' do + context 'when change is sent by the author of the lock' do let(:user) { owner } it "doesn't raise any error" do |