summaryrefslogtreecommitdiff
path: root/spec/javascripts/environments/environment_stop_spec.js.es6
blob: 37fba925e169b3d43c075fe28e670a80d8ce81ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//= require vue
//= require environments/components/environment_stop
describe('Stop Component', () => {
  fixture.preload('environments/element.html');
  beforeEach(() => {
    fixture.load('environments/element.html');
  });

  it('should link to the provided URL', () => {
    const stopURL = '/stop';
    const component = new window.gl.environmentsList.StopComponent({
      el: document.querySelector('.test-dom-element'),
      propsData: {
        stop_url: stopURL,
      },
    });
    expect(component.$el.getAttribute('href')).toEqual(stopURL);
  });
});