debian-mirror-gitlab/spec/javascripts/fixtures/raw.rb

40 lines
1.1 KiB
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
2019-09-04 21:01:54 +05:30
describe 'Raw files', '(JavaScript fixtures)' do
2017-08-17 22:00:37 +05:30
include JavaScriptFixturesHelpers
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
2017-09-10 17:25:29 +05:30
let(:project) { create(:project, :repository, namespace: namespace, path: 'raw-project') }
2019-09-04 21:01:54 +05:30
let(:response) { @blob.data.force_encoding('UTF-8') }
2017-08-17 22:00:37 +05:30
before(:all) do
2019-09-04 21:01:54 +05:30
clean_frontend_fixtures('blob/balsamiq/')
2017-08-17 22:00:37 +05:30
clean_frontend_fixtures('blob/notebook/')
2019-09-04 21:01:54 +05:30
clean_frontend_fixtures('blob/pdf/')
2017-08-17 22:00:37 +05:30
end
2018-03-17 18:26:18 +05:30
after do
remove_repository(project)
end
2019-09-04 21:01:54 +05:30
it 'blob/balsamiq/test.bmpr' do
@blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr')
2017-08-17 22:00:37 +05:30
end
2019-09-04 21:01:54 +05:30
it 'blob/notebook/basic.json' do
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
end
2017-08-17 22:00:37 +05:30
2019-09-04 21:01:54 +05:30
it 'blob/notebook/worksheets.json' do
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb')
2017-08-17 22:00:37 +05:30
end
2017-09-10 17:25:29 +05:30
2019-09-04 21:01:54 +05:30
it 'blob/notebook/math.json' do
@blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb')
end
2017-09-10 17:25:29 +05:30
2019-09-04 21:01:54 +05:30
it 'blob/pdf/test.pdf' do
@blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf')
2017-09-10 17:25:29 +05:30
end
2017-08-17 22:00:37 +05:30
end