Fix broken tests

This commit is contained in:
Filipa Lacerda 2016-11-18 19:40:47 +00:00
parent 8765fcdca7
commit 43898f8efb
2 changed files with 11 additions and 11 deletions

View file

@ -12,11 +12,11 @@ describe('Actions Component', () => {
const actionsMock = [ const actionsMock = [
{ {
name: 'bar', name: 'bar',
play_url: 'https://gitlab.com/play', play_path: 'https://gitlab.com/play',
}, },
{ {
name: 'foo', name: 'foo',
play_url: '#', play_path: '#',
}, },
]; ];
@ -32,6 +32,6 @@ describe('Actions Component', () => {
).toEqual(actionsMock.length); ).toEqual(actionsMock.length);
expect( expect(
component.$el.querySelector('.dropdown-menu li a').getAttribute('href') component.$el.querySelector('.dropdown-menu li a').getAttribute('href')
).toEqual(actionsMock[0].play_url); ).toEqual(actionsMock[0].play_path);
}); });
}); });

View file

@ -74,7 +74,7 @@ describe('Environment item', () => {
sha: '500aabcb17c97bdcf2d0c410b70cb8556f0362dd', sha: '500aabcb17c97bdcf2d0c410b70cb8556f0362dd',
ref: { ref: {
name: 'master', name: 'master',
ref_url: 'http://localhost:3000/root/ci-folders/tree/master', ref_path: 'root/ci-folders/tree/master',
}, },
tag: true, tag: true,
'last?': true, 'last?': true,
@ -102,23 +102,23 @@ describe('Environment item', () => {
avatar_url: 'http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon', avatar_url: 'http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon',
web_url: 'http://localhost:3000/root', web_url: 'http://localhost:3000/root',
}, },
commit_url: 'http://localhost:3000/root/ci-folders/tree/500aabcb17c97bdcf2d0c410b70cb8556f0362dd', commit_path: '/root/ci-folders/tree/500aabcb17c97bdcf2d0c410b70cb8556f0362dd',
}, },
deployable: { deployable: {
id: 1279, id: 1279,
name: 'deploy', name: 'deploy',
build_url: 'http://localhost:3000/root/ci-folders/builds/1279', build_path: '/root/ci-folders/builds/1279',
retry_url: 'http://localhost:3000/root/ci-folders/builds/1279/retry', retry_path: '/root/ci-folders/builds/1279/retry',
}, },
manual_actions: [ manual_actions: [
{ {
name: 'action', name: 'action',
play_url: 'http://localhost:3000/play', play_path: '/play',
}, },
], ],
}, },
'stoppable?': true, 'stoppable?': true,
environment_url: 'http://localhost:3000/root/ci-folders/environments/31', environment_path: 'root/ci-folders/environments/31',
created_at: '2016-11-07T11:11:16.525Z', created_at: '2016-11-07T11:11:16.525Z',
updated_at: '2016-11-10T15:55:58.778Z', updated_at: '2016-11-10T15:55:58.778Z',
}; };
@ -161,13 +161,13 @@ describe('Environment item', () => {
it('Should link to build url provided', () => { it('Should link to build url provided', () => {
expect( expect(
component.$el.querySelector('.build-link').getAttribute('href') component.$el.querySelector('.build-link').getAttribute('href')
).toEqual(environment.last_deployment.deployable.build_url); ).toEqual(environment.last_deployment.deployable.build_path);
}); });
it('Should render deployable name and id', () => { it('Should render deployable name and id', () => {
expect( expect(
component.$el.querySelector('.build-link').getAttribute('href') component.$el.querySelector('.build-link').getAttribute('href')
).toEqual(environment.last_deployment.deployable.build_url); ).toEqual(environment.last_deployment.deployable.build_path);
}); });
}); });