summaryrefslogtreecommitdiff
path: root/spec/javascripts/projects/project_import_gitlab_project_spec.js
blob: 2f1aae109e389cfa7b8ea524345a3208604e7c22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import projectImportGitlab from '~/projects/project_import_gitlab_project';

describe('Import Gitlab project', () => {
  let projectName;
  beforeEach(() => {
    projectName = 'project';
    window.history.pushState({}, null, `?path=${projectName}`);

    setFixtures(`
      <input class="js-path-name" />
    `);

    projectImportGitlab.bindEvents();
  });

  afterEach(() => {
    window.history.pushState({}, null, '');
  });

  describe('path name', () => {
    it('should fill in the project name derived from the previously filled project name', () => {
      expect(document.querySelector('.js-path-name').value).toEqual(projectName);
    });
  });
});