MM-19310 - Wrong validation message when Bot name ends in a . (#12905)

* MM-19310 - Wrong validation message when Bot name ends in a .

* Reverting back old behaviour
Этот коммит содержится в:
Ali Farooq
2019-10-30 17:00:43 -04:00
коммит произвёл GitHub
родитель a221c52acb
Коммит e4ed763e2a
2 изменённых файлов: 15 добавлений и 2 удалений

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

@@ -45,6 +45,20 @@ func TestCreateBot(t *testing.T) {
require.NotNil(t, err)
require.Equal(t, "model.bot.is_valid.description.app_error", err.Id)
})
t.Run("username contains . character", func(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
bot, err := th.App.CreateBot(&model.Bot{
Username: "username.",
Description: "a bot",
OwnerId: th.BasicUser.Id,
})
require.NotNil(t, err)
require.Nil(t, bot)
require.Equal(t, "model.user.is_valid.email.app_error", err.Id)
})
})
t.Run("create bot", func(t *testing.T) {