'../../../request/registry',
'intern/dojo/_base/lang',
'intern/dojo/has!host-browser?dojo/domReady!'
], function (registerSuite, assert, registry, has, lang) {
name: 'dojo/request/registry',
'RegExp registration works': function () {
var handle = registry.register(/^foo/, dfd.callback(function (url) {
assert.match(url, /^foo/);
'functional registration works': function () {
var handle = registry.register(function (url, options) {
return options.method === 'POST';
}, dfd.callback(function (url, options) {
assert.equal(options.method, 'POST');
'string registration works': function () {
var handle = registry.register('foobar', dfd.callback(function (url) {
assert.equal(url, 'foobar');
if(has('host-browser')) {
'fallback works': function () {
var handle = registry.register('foobar', function () {
.then(lang.hitch(dfd, dfd.resolve), lang.hitch(dfd, dfd.reject))