Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team.

Renaming team.Name to team.DisplayName and team.Domain to team.Name.
So: team.Name -> url safe name. team.DisplayName -> nice name for users
Этот коммит содержится в:
Christopher Speller
2015-07-08 11:50:10 -04:00
родитель a1876cf6cc
Коммит c6fb95912b
86 изменённых файлов: 891 добавлений и 1214 удалений

Просмотреть файл

@@ -83,9 +83,9 @@ var domains = []struct {
{"test", true},
}
func TestValidDomain(t *testing.T) {
func TestValidTeamName(t *testing.T) {
for _, v := range domains {
if IsValidDomain(v.value) != v.expected {
if IsValidTeamName(v.value) != v.expected {
t.Errorf("expect %v as %v", v.value, v.expected)
}
}
@@ -102,9 +102,9 @@ var tReservedDomains = []struct {
{"spin-punch-admin", false},
}
func TestReservedDomain(t *testing.T) {
func TestReservedTeamName(t *testing.T) {
for _, v := range tReservedDomains {
if IsReservedDomain(v.value) != v.expected {
if IsReservedTeamName(v.value) != v.expected {
t.Errorf("expect %v as %v", v.value, v.expected)
}
}