views/realm_aliases.py: Use domain instead of id as handle for RealmAlias.

We need to make the change for the API, and the next commit introduces a
unique_together constraint on (realm, domain) anyway.
This commit is contained in:
Harshit Bansal
2017-01-21 00:09:27 -08:00
committed by Tim Abbott
parent 06cc306d00
commit b4186fdfdd
10 changed files with 29 additions and 37 deletions

View File

@@ -95,7 +95,6 @@ function render(template_name, args) {
var html = "<table>";
var args = {
alias: {
id: 1,
domain: 'zulip.org',
},
};
@@ -104,16 +103,11 @@ function render(template_name, args) {
var button = $(html).find('.btn');
var domain = $(html).find('.domain');
var row = button.closest('tr');
assert.equal(button.text().trim(), "Remove");
assert(button.hasClass("delete_alias"));
assert.equal(button.data("id"), "1");
assert.equal(domain.text(), "zulip.org");
assert.equal(row.attr("id"), "alias_1");
global.write_handlebars_output("admin-alias-list", html);
}());