Commit 9c521c85 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Made BlobViewer jasmine integration spec use snippets view instead of pblob view

parent bc44e646
......@@ -3,10 +3,10 @@ import BlobViewer from '~/blob/viewer/index';
describe('Blob viewer', () => {
let blob;
preloadFixtures('blob/show.html.raw');
preloadFixtures('snippets/show.html.raw');
beforeEach(() => {
loadFixtures('blob/show.html.raw');
loadFixtures('snippets/show.html.raw');
$('#modal-upload-blob').remove();
blob = new BlobViewer();
......
require 'spec_helper'
describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do
describe SnippetsController, '(JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers
let(:admin) { create(:admin) }
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
let(:project) { create(:project, :repository, namespace: namespace, path: 'branches-project') }
let(:snippet) { create(:personal_snippet, title: 'snippet.md', content: '# snippet', file_name: 'snippet.md', author: admin) }
render_views
before(:all) do
clean_frontend_fixtures('blob/')
clean_frontend_fixtures('snippets/')
end
before(:each) do
sign_in(admin)
end
it 'blob/show.html.raw' do |example|
get(:show,
namespace_id: project.namespace,
project_id: project,
id: 'add-ipython-files/files/ipython/basic.ipynb')
it 'snippets/show.html.raw' do |example|
get(:show, id: snippet.to_param)
expect(response).to be_success
store_frontend_fixture(response, example.description)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment