Skip to content

Commit

Permalink
[#540] Fixes for failing front-end JS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin authored and Sean Hammond committed Apr 23, 2013
1 parent f4adfdb commit 518bc19
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 1 addition & 2 deletions ckan/public/base/test/index.html
Expand Up @@ -26,8 +26,7 @@
<!-- Source -->
<script src="../vendor/jed.js"></script>
<script src="../vendor/jquery.js"></script>
<script src="../vendor/bootstrap/js/bootstrap-transition.js"></script>
<script src="../vendor/bootstrap/js/bootstrap-alert.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.js"></script>
<script src="../javascript/plugins/jquery.inherit.js"></script>
<script src="../javascript/plugins/jquery.proxy-all.js"></script>
<script src="../javascript/plugins/jquery.url-helpers.js"></script>
Expand Down
6 changes: 3 additions & 3 deletions ckan/public/base/test/spec/client.spec.js
Expand Up @@ -154,7 +154,7 @@ describe('ckan.Client()', function () {
}
};

var target = this.client.parseCompletions(data);
var target = this.client.parseCompletions(data, {});

assert.deepEqual(target, ["1 percent", "18thc", "19thcentury"]);
});
Expand All @@ -168,7 +168,7 @@ describe('ckan.Client()', function () {
}
};

var target = this.client.parseCompletions(data);
var target = this.client.parseCompletions(data, {});

assert.deepEqual(target, ["json", "csv", "text"]);
});
Expand All @@ -182,7 +182,7 @@ describe('ckan.Client()', function () {
}
};

var target = this.client.parseCompletions(data);
var target = this.client.parseCompletions(data, {});

assert.deepEqual(target, ["Test"]);
});
Expand Down
7 changes: 0 additions & 7 deletions ckan/public/base/test/spec/modules/autocomplete.spec.js
Expand Up @@ -146,13 +146,6 @@ describe('ckan.modules.AutocompleteModule()', function () {
this.module.getCompletions('term with spaces');
assert.calledWith(this.target, 'http://example.com?term=term%20with%20spaces');
});

it('should set the formatter to work with the plugin', function () {
this.module.getCompletions(this.term);
assert.calledWith(this.target, 'http://example.com?term=term', {
format: this.sandbox.client.parseCompletionsForPlugin
});
});
});

describe('.lookup(term, fn)', function () {
Expand Down

0 comments on commit 518bc19

Please sign in to comment.