summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-04-20 14:36:38 +0200
committerWinnie Hellmann <winnie@gitlab.com>2019-05-10 14:12:19 +0200
commitdff8bd0c03f2d8f186909855a46d46bb90d9b391 (patch)
tree5c906a182fca8e06e0b23479223de2c006fbbfe7
parent3e881f7aa5e2ba783ef5bfb4ba3eda73f1fe9a17 (diff)
downloadgitlab-ce-dff8bd0c03f2d8f186909855a46d46bb90d9b391.tar.gz
Merge PDF fixture into raw file fixtures
-rw-r--r--spec/javascripts/fixtures/pdf.rb18
-rw-r--r--spec/javascripts/fixtures/raw.rb7
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