mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
populate_db: Rename URL type custom profile field.
Rename URL type custom profile field in populate db to avoid confusion with the "GitHub profile" custom external account profile field we'll be adding shortly.
This commit is contained in:
committed by
Tim Abbott
parent
a3fca01922
commit
f813fdcd5e
@@ -386,7 +386,7 @@ class CustomProfileFieldTest(ZulipTestCase):
|
||||
u"{} is not a string".format(field_name))
|
||||
|
||||
def test_update_invalid_url(self) -> None:
|
||||
field_name = "GitHub profile"
|
||||
field_name = "Favorite website"
|
||||
self.assert_error_update_invalid_value(field_name, u"not URL",
|
||||
u"{} is not a URL".format(field_name))
|
||||
|
||||
@@ -414,7 +414,7 @@ class CustomProfileFieldTest(ZulipTestCase):
|
||||
('Favorite food', 'long short text data'),
|
||||
('Favorite editor', 'vim'),
|
||||
('Birthday', '1909-3-5'),
|
||||
('GitHub profile', 'https://github.com/ABC'),
|
||||
('Favorite website', 'https://zulipchat.com'),
|
||||
('Mentor', [self.example_user("cordelia").id]),
|
||||
]
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ class PermissionTest(ZulipTestCase):
|
||||
'Favorite food': 'short text data',
|
||||
'Favorite editor': 'vim',
|
||||
'Birthday': '1909-3-5',
|
||||
'GitHub profile': 'https://github.com/ABC',
|
||||
'Favorite website': 'https://zulipchat.com',
|
||||
'Mentor': [cordelia.id],
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ class PermissionTest(ZulipTestCase):
|
||||
invalid_fields = [
|
||||
('Favorite editor', 'invalid choice', "'invalid choice' is not a valid choice for 'Favorite editor'."),
|
||||
('Birthday', '1909-34-55', "Birthday is not a date"),
|
||||
('GitHub profile', 'not url', "GitHub profile is not a URL"),
|
||||
('Favorite website', 'not url', "Favorite website is not a URL"),
|
||||
('Mentor', "not list of user ids", "User IDs is not a list"),
|
||||
]
|
||||
|
||||
@@ -499,7 +499,7 @@ class PermissionTest(ZulipTestCase):
|
||||
'Favorite food': None,
|
||||
'Favorite editor': None,
|
||||
'Birthday': None,
|
||||
'GitHub profile': 'https://github.com/DEF',
|
||||
'Favorite website': 'https://zulip.github.io',
|
||||
'Mentor': [hamlet.id]
|
||||
}
|
||||
new_profile_data = []
|
||||
|
||||
@@ -355,7 +355,7 @@ class Command(BaseCommand):
|
||||
field_data=field_data)
|
||||
birthday = try_add_realm_custom_profile_field(zulip_realm, "Birthday",
|
||||
CustomProfileField.DATE)
|
||||
favorite_website = try_add_realm_custom_profile_field(zulip_realm, "GitHub profile",
|
||||
favorite_website = try_add_realm_custom_profile_field(zulip_realm, "Favorite website",
|
||||
CustomProfileField.URL,
|
||||
hint="Or your personal blog's URL")
|
||||
mentor = try_add_realm_custom_profile_field(zulip_realm, "Mentor",
|
||||
@@ -369,7 +369,7 @@ class Command(BaseCommand):
|
||||
{"id": favorite_food.id, "value": "Apples"},
|
||||
{"id": favorite_editor.id, "value": "emacs"},
|
||||
{"id": birthday.id, "value": "2000-1-1"},
|
||||
{"id": favorite_website.id, "value": "https://github.com/zulip/zulip"},
|
||||
{"id": favorite_website.id, "value": "https://zulip.readthedocs.io/en/latest/"},
|
||||
{"id": mentor.id, "value": [hamlet.id]},
|
||||
])
|
||||
do_update_user_custom_profile_data(hamlet, [
|
||||
|
||||
Reference in New Issue
Block a user