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', () => {
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();

View file

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