summaryrefslogtreecommitdiff
path: root/spec/frontend/fixtures/raw.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-07-18 14:11:09 -0500
committerMike Greiling <mike@pixelcog.com>2019-07-19 02:27:15 -0500
commit97b8f85e03f0b6dcfc5d85b92323be979bd27b09 (patch)
tree63c1d694be569bd91b77184dd883c50122d321f8 /spec/frontend/fixtures/raw.rb
parent1abe3e514f3fb1920862829cfc272ad7f73e714a (diff)
downloadgitlab-ce-97b8f85e03f0b6dcfc5d85b92323be979bd27b09.tar.gz
Move frontend fixtures into spec/frontend
Moves every fixture source file from spec/javascripts to spec/frontend
Diffstat (limited to 'spec/frontend/fixtures/raw.rb')
-rw-r--r--spec/frontend/fixtures/raw.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/frontend/fixtures/raw.rb b/spec/frontend/fixtures/raw.rb
new file mode 100644
index 00000000000..801c80a0112
--- /dev/null
+++ b/spec/frontend/fixtures/raw.rb
@@ -0,0 +1,39 @@
+require 'spec_helper'
+
+describe 'Raw files', '(JavaScript fixtures)' do
+ include JavaScriptFixturesHelpers
+
+ 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') }
+
+ before(:all) do
+ clean_frontend_fixtures('blob/balsamiq/')
+ clean_frontend_fixtures('blob/notebook/')
+ clean_frontend_fixtures('blob/pdf/')
+ end
+
+ after do
+ remove_repository(project)
+ end
+
+ it 'blob/balsamiq/test.bmpr' do
+ @blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr')
+ end
+
+ it 'blob/notebook/basic.json' do
+ @blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
+ end
+
+ it 'blob/notebook/worksheets.json' do
+ @blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb')
+ end
+
+ it 'blob/notebook/math.json' do
+ @blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb')
+ end
+
+ it 'blob/pdf/test.pdf' do
+ @blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf')
+ end
+end