mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
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:
committed by
Tim Abbott
parent
06cc306d00
commit
b4186fdfdd
@@ -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);
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user