diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-26 12:10:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-26 12:10:08 +0300 |
commit | bc8f298b647859a411d38a440c397e5990ef4941 (patch) | |
tree | 8cb8709c39e8464aa8daf866677c3915997b563a /spec/frontend/fixtures/raw.rb | |
parent | 227e1aaaf7fb9e1152c7c2e34efae04891de8fd8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures/raw.rb')
-rw-r--r-- | spec/frontend/fixtures/raw.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/spec/frontend/fixtures/raw.rb b/spec/frontend/fixtures/raw.rb index 211c4e7c048..b117cfea5fa 100644 --- a/spec/frontend/fixtures/raw.rb +++ b/spec/frontend/fixtures/raw.rb @@ -7,41 +7,45 @@ RSpec.describe 'Raw files', '(JavaScript fixtures)' do let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} let(:project) { create(:project, :repository, namespace: namespace, path: 'raw-project') } - let(:response) { @blob.data.force_encoding('UTF-8') } + let(:response) { @response } + + def blob_at(commit, path) + @response = project.repository.blob_at(commit, path).data.force_encoding('UTF-8') + end after do remove_repository(project) end it 'blob/notebook/basic.json' do - @blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb') + blob_at('6d85bb69', 'files/ipython/basic.ipynb') end it 'blob/notebook/markdown-table.json' do - @blob = project.repository.blob_at('f6b7a707', 'files/ipython/markdown-table.ipynb') + blob_at('f6b7a707', 'files/ipython/markdown-table.ipynb') end it 'blob/notebook/worksheets.json' do - @blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb') + blob_at('6d85bb69', 'files/ipython/worksheets.ipynb') end it 'blob/notebook/math.json' do - @blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb') + blob_at('93ee732', 'files/ipython/math.ipynb') end it 'blob/pdf/test.pdf' do - @blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf') + blob_at('e774ebd33', 'files/pdf/test.pdf') end it 'blob/text/README.md' do - @blob = project.repository.blob_at('e774ebd33', 'README.md') + blob_at('e774ebd33', 'README.md') end it 'blob/images/logo-white.png' do - @blob = project.repository.blob_at('e774ebd33', 'files/images/logo-white.png') + blob_at('e774ebd33', 'files/images/logo-white.png') end it 'blob/binary/Gemfile.zip' do - @blob = project.repository.blob_at('e774ebd33', 'Gemfile.zip') + blob_at('e774ebd33', 'Gemfile.zip') end end |