Explicitly name namespace and projects for frontend fixtures

This commit is contained in:
winniehell 2016-11-20 00:40:37 +01:00
parent 918bc207c6
commit 82429b6978
4 changed files with 6 additions and 4 deletions

View file

@ -10,7 +10,7 @@
//= require turbolinks
describe('Build', () => {
const BUILD_URL = `${gl.TEST_HOST}/namespace1/project1/builds/1`;
const BUILD_URL = `${gl.TEST_HOST}/frontend-fixtures/builds-project/builds/1`;
// see spec/factories/ci/builds.rb
const BUILD_TRACE = 'BUILD TRACE';
// see lib/ci/ansi2html.rb

View file

@ -4,7 +4,8 @@ describe Projects::BuildsController, '(JavaScript fixtures)', type: :controller
include JavaScriptFixturesHelpers
let(:admin) { create(:admin) }
let(:project) { create(:project_empty_repo) }
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
let(:project) { create(:project_empty_repo, namespace: namespace, path: 'builds-project') }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let!(:build_with_artifacts) { create(:ci_build, :success, :artifacts, :trace, pipeline: pipeline, stage: 'test', artifacts_expire_at: Time.now + 18.months) }
let!(:failed_build) { create(:ci_build, :failed, pipeline: pipeline, stage: 'build') }

View file

@ -4,7 +4,8 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller
include JavaScriptFixturesHelpers
let(:admin) { create(:admin) }
let(:project) { create(:project_empty_repo) }
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
let(:project) { create(:project_empty_repo, namespace: namespace, path: 'issues-project') }
render_views

View file

@ -74,7 +74,7 @@
it('submits an ajax request on tasklist:changed', function() {
spyOn(jQuery, 'ajax').and.callFake(function(req) {
expect(req.type).toBe('PATCH');
expect(req.url).toBe(gl.TEST_HOST + '/namespace3/project3/issues/1.json');
expect(req.url).toBe(gl.TEST_HOST + '/frontend-fixtures/issues-project/issues/1.json'); // eslint-disable-line prefer-template
expect(req.data.issue.description).not.toBe(null);
});