Update the code to check if url is a function

Also updates the test to ensure the url is passed to Backbone.ajax