diff options
Diffstat (limited to 'spec/lib/gitlab/checks/diff_check_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/diff_check_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/checks/diff_check_spec.rb b/spec/lib/gitlab/checks/diff_check_spec.rb index dd467537a4f..20c6ad8a6e8 100644 --- a/spec/lib/gitlab/checks/diff_check_spec.rb +++ b/spec/lib/gitlab/checks/diff_check_spec.rb @@ -94,7 +94,7 @@ RSpec.describe Gitlab::Checks::DiffCheck, feature_category: :source_code_managem context 'when change is sent by a different user' do it 'raises an error if the user is not allowed to update the file' do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'README' is locked in Git LFS by #{lock.user.name}") + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'README' is locked in Git LFS by #{lock.user.username}") end end @@ -148,7 +148,7 @@ RSpec.describe Gitlab::Checks::DiffCheck, feature_category: :source_code_managem end it "does raise an error" do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'files/locked/baz.lfs' is locked in Git LFS by #{owner.name}") + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError, "The path 'files/locked/baz.lfs' is locked in Git LFS by #{owner.username}") end end end |