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'; ...@@ -3,10 +3,10 @@ import BlobViewer from '~/blob/viewer/index';
describe('Blob viewer', () => { describe('Blob viewer', () => {
let blob; let blob;
preloadFixtures('blob/show.html.raw'); preloadFixtures('snippets/show.html.raw');
beforeEach(() => { beforeEach(() => {
loadFixtures('blob/show.html.raw'); loadFixtures('snippets/show.html.raw');
$('#modal-upload-blob').remove(); $('#modal-upload-blob').remove();
blob = new BlobViewer(); blob = new BlobViewer();
......
require 'spec_helper' require 'spec_helper'
describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do describe SnippetsController, '(JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers include JavaScriptFixturesHelpers
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
let(:project) { create(:project, :repository, namespace: namespace, path: 'branches-project') } 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 render_views
before(:all) do before(:all) do
clean_frontend_fixtures('blob/') clean_frontend_fixtures('snippets/')
end end
before(:each) do before(:each) do
sign_in(admin) sign_in(admin)
end end
it 'blob/show.html.raw' do |example| it 'snippets/show.html.raw' do |example|
get(:show, get(:show, id: snippet.to_param)
namespace_id: project.namespace,
project_id: project,
id: 'add-ipython-files/files/ipython/basic.ipynb')
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description) 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