diff options
Diffstat (limited to 'spec/helpers/tree_helper_spec.rb')
-rw-r--r-- | spec/helpers/tree_helper_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/helpers/tree_helper_spec.rb b/spec/helpers/tree_helper_spec.rb index 620bf248d7b..136ec07e73d 100644 --- a/spec/helpers/tree_helper_spec.rb +++ b/spec/helpers/tree_helper_spec.rb @@ -216,6 +216,24 @@ RSpec.describe TreeHelper do web_ide_url: "/-/ide/project/#{project.full_path}/edit/#{sha}/-/#{@path}" ) end + + it 'does not load blob from repository again' do + blob + + expect(repository).not_to receive(:blob_at) + + subject + end + end + + context 'nil blob is passed' do + let(:blob) { nil } + + it 'does not load blob from repository' do + expect(repository).not_to receive(:blob_at) + + subject + end end context 'user does not have write access but a personal fork exists' do |