Switch to fixed getcomposer.org links

This commit is contained in:
Shivam Mathur
2020-08-14 19:32:54 +05:30
parent 9bd0fdbc18
commit 3543ed1ef8
5 changed files with 4 additions and 969 deletions

View File

@ -1,21 +1,5 @@
import * as httpm from '@actions/http-client';
import * as tools from '../src/tools';
httpm.HttpClient.prototype.get = jest.fn().mockImplementation(() => {
return {
message: null,
readBody: jest.fn().mockImplementation(() => {
return JSON.stringify({
stable: [{path: '/composer-stable.phar'}],
preview: [{path: '/composer-preview.phar'}],
snapshot: [{path: '/composer.phar'}],
'1': [{path: '/composer-1.phar'}],
'2': [{path: '/composer-2.phar'}]
});
})
};
});
describe('Tools tests', () => {
it('checking parseToolVersion', async () => {
expect(await tools.getToolVersion('latest')).toBe('latest');