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:
parent
21b076d15f
commit
3eb8e17daa
|
@ -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
Loading…
Reference in New Issue
Block a user