mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* UI: ignore list improved:
* Added support of usernames with spaces (#6305); * Increased max limit from 50 to 100; * Added list size info on connection or command usage;
This commit is contained in:
parent
299be53e7a
commit
f50bc8f36f
7 changed files with 62 additions and 47 deletions
|
|
@ -23,14 +23,14 @@ public class IgnoreListTest {
|
|||
|
||||
@Test
|
||||
public void ignoreListEmpty() throws Exception {
|
||||
assertThat(IgnoreList.ignoreListString("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: []</font>"));
|
||||
assertThat(IgnoreList.getIgnoreListInfo("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: []</font>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ignoreList() throws Exception {
|
||||
final String test = IgnoreList.ignore("test.com.xx", "test");
|
||||
final String kranken = IgnoreList.ignore("test.com.xx", "kranken");
|
||||
assertThat(IgnoreList.ignoreListString("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: [kranken, test]</font>"));
|
||||
assertThat(IgnoreList.getIgnoreListInfo("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: [kranken, test]</font>"));
|
||||
assertThat(test, is("Added test to your ignore list on test.com.xx"));
|
||||
assertThat(kranken, is("Added kranken to your ignore list on test.com.xx"));
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ public class IgnoreListTest {
|
|||
public void ignoreDefaultResponse() throws Exception {
|
||||
final String r1 = IgnoreList.ignore("test.com.xx", "");
|
||||
final String r2 = IgnoreList.ignore("test.com.xx", null);
|
||||
assertThat(IgnoreList.ignoreListString("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: []</font>"));
|
||||
assertThat(IgnoreList.getIgnoreListInfo("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: []</font>"));
|
||||
assertEquals(r1, r2);
|
||||
assertEquals(r2, "<font color=yellow>Current ignore list on test.com.xx: []</font>");
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ public class IgnoreListTest {
|
|||
}
|
||||
final String r = IgnoreList.ignore("test.com.xx", "lul");
|
||||
assertEquals(r, "Your ignore list is too big, remove a user to be able to add a new one.");
|
||||
assertThat(IgnoreList.ignoreListString("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: [0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 6, 7, 8, 9]</font>"));
|
||||
assertThat(IgnoreList.getIgnoreListInfo("test.com.xx"), is("<font color=yellow>Current ignore list on test.com.xx: [0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 6, 7, 8, 9]</font>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue