If Travis.endpoint is undefined, use empty string

mockjax expects urls exactly as defined, so if you mock '/repos' it will
not match 'http://localhost:9292/repos'. If endpoint is undefined (like
in specs), we may just try to use path.
This commit is contained in:
Piotr Sarnacki 2012-07-28 23:35:16 +02:00
parent 21b076d15f
commit 3eb8e17daa
2 changed files with 3 additions and 2 deletions

View File

@ -27,4 +27,5 @@ jQuery.support.cors = true
worker: 'workers'
ajax: (url, method, options) ->
@_super("#{Travis.config.api_endpoint}#{url}", method, $.extend(options, @DEFAULT_OPTIONS))
endpoint = Travis.config.api_endpoint || ''
@_super("#{endpoint}#{url}", method, $.extend(options, @DEFAULT_OPTIONS))

File diff suppressed because one or more lines are too long