improve usernames
This commit is contained in:
parent
98798fa14f
commit
40d57fb245
10 changed files with 106 additions and 0 deletions
|
@ -5,6 +5,7 @@ void main() {
|
|||
validUsernameTest();
|
||||
usernameToUrlTest();
|
||||
cleanupNameTest();
|
||||
userFromUsernameTest();
|
||||
}
|
||||
|
||||
void validUsernameTest() {
|
||||
|
@ -36,3 +37,10 @@ void cleanupNameTest() {
|
|||
expect(cleanUpUsername(name: ""), "");
|
||||
});
|
||||
}
|
||||
|
||||
void userFromUsernameTest() {
|
||||
test("try extracting user from the full valid user id", () {
|
||||
expect(userFromUsername(name: "@hello@world"), "hello");
|
||||
expect(userFromUsername(name: "@john@from.garfield"), "john");
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue