Skip to content

Commit

Permalink
use checkUrl instead of checkURL
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 committed Jan 14, 2021
1 parent 533ef58 commit 2a1af0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/provider/Provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Provider extends Instantiable {
* @param {String} url
* @return {Promise<urlDetails>} urlDetails
*/
public async checkURL(url: string): Promise<File> {
public async checkUrl(url: string): Promise<File> {
const args = { url }
try {
const response = await this.ocean.utils.fetch.post(
Expand Down
4 changes: 2 additions & 2 deletions test/integration/Provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ describe('Provider tests', () => {
})
it('Check a valid URL', async () => {
const url = 'https://s3.amazonaws.com/testfiles.oceanprotocol.com/info.0.json'
const response = await ocean.provider.checkURL(url)
const response = await ocean.provider.checkUrl(url)
assert(response != null)
assert(response.contentLength === '1161')
assert(response.contentType === 'application/json')
})
it('Check a invalid URL', async () => {
const url = 'https://s3.amazonaws.com/testfiles.oceanprotocol.com/nosuchfile'
const response = await ocean.provider.checkURL(url)
const response = await ocean.provider.checkUrl(url)
assert(response === null)
})
})

0 comments on commit 2a1af0d

Please sign in to comment.