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

This commit is contained in:
Luke "Jared" Bennett 2017-07-17 17:55:50 +01:00
parent bc44e646d5
commit 9c521c8526
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
2 changed files with 7 additions and 9 deletions

View file

@ -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();

View file

@ -1,27 +1,25 @@
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)