2019-10-17 06:07:30 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-11 20:25:10 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe 'Raw files', '(JavaScript fixtures)' do
|
2017-04-11 20:25:10 +00:00
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
|
2017-08-01 18:51:52 +00:00
|
|
|
let(:project) { create(:project, :repository, namespace: namespace, path: 'raw-project') }
|
2019-04-20 12:33:47 +00:00
|
|
|
let(:response) { @blob.data.force_encoding('UTF-8') }
|
2017-04-11 20:25:10 +00:00
|
|
|
|
|
|
|
before(:all) do
|
2019-04-20 12:39:36 +00:00
|
|
|
clean_frontend_fixtures('blob/balsamiq/')
|
2017-04-11 20:25:10 +00:00
|
|
|
clean_frontend_fixtures('blob/notebook/')
|
2019-04-20 12:36:38 +00:00
|
|
|
clean_frontend_fixtures('blob/pdf/')
|
2017-04-11 20:25:10 +00:00
|
|
|
end
|
|
|
|
|
2017-08-22 23:19:35 +00:00
|
|
|
after do
|
|
|
|
remove_repository(project)
|
|
|
|
end
|
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'blob/balsamiq/test.bmpr' do
|
2019-04-20 12:39:36 +00:00
|
|
|
@blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr')
|
|
|
|
end
|
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'blob/notebook/basic.json' do
|
2019-04-20 12:33:47 +00:00
|
|
|
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
|
2017-04-11 20:25:10 +00:00
|
|
|
end
|
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'blob/notebook/worksheets.json' do
|
2019-04-20 12:33:47 +00:00
|
|
|
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb')
|
2017-04-11 20:25:10 +00:00
|
|
|
end
|
2017-05-30 15:00:36 +00:00
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'blob/notebook/math.json' do
|
2019-04-20 12:33:47 +00:00
|
|
|
@blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb')
|
2017-05-30 15:00:36 +00:00
|
|
|
end
|
2019-04-20 12:36:38 +00:00
|
|
|
|
2019-04-21 10:58:07 +00:00
|
|
|
it 'blob/pdf/test.pdf' do
|
2019-04-20 12:36:38 +00:00
|
|
|
@blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf')
|
|
|
|
end
|
2017-04-11 20:25:10 +00:00
|
|
|
end
|