diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-04-20 14:36:38 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-05-10 14:12:19 +0200 |
commit | dff8bd0c03f2d8f186909855a46d46bb90d9b391 (patch) | |
tree | 5c906a182fca8e06e0b23479223de2c006fbbfe7 /spec/javascripts | |
parent | 3e881f7aa5e2ba783ef5bfb4ba3eda73f1fe9a17 (diff) | |
download | gitlab-ce-dff8bd0c03f2d8f186909855a46d46bb90d9b391.tar.gz |
Merge PDF fixture into raw file fixtures
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/fixtures/pdf.rb | 18 | ||||
-rw-r--r-- | spec/javascripts/fixtures/raw.rb | 7 |
2 files changed, 7 insertions, 18 deletions
diff --git a/spec/javascripts/fixtures/pdf.rb b/spec/javascripts/fixtures/pdf.rb deleted file mode 100644 index ef9976b9fd3..00000000000 --- a/spec/javascripts/fixtures/pdf.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'spec_helper' - -describe 'PDF file', '(JavaScript fixtures)', type: :controller do - include JavaScriptFixturesHelpers - - let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} - let(:project) { create(:project, :repository, namespace: namespace, path: 'pdf-project') } - - before(:all) do - clean_frontend_fixtures('blob/pdf/') - end - - it 'blob/pdf/test.pdf' do |example| - blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf') - - store_frontend_fixture(blob.data.force_encoding("utf-8"), example.description) - end -end diff --git a/spec/javascripts/fixtures/raw.rb b/spec/javascripts/fixtures/raw.rb index 8813ed31339..80304767788 100644 --- a/spec/javascripts/fixtures/raw.rb +++ b/spec/javascripts/fixtures/raw.rb @@ -9,6 +9,7 @@ describe 'Raw files', '(JavaScript fixtures)' do before(:all) do clean_frontend_fixtures('blob/notebook/') + clean_frontend_fixtures('blob/pdf/') end after do @@ -32,4 +33,10 @@ describe 'Raw files', '(JavaScript fixtures)' do store_frontend_fixture(response, example.description) end + + it 'blob/pdf/test.pdf' do |example| + @blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf') + + store_frontend_fixture(response, example.description) + end end |