MM-23244: Validate that AuthData and AuthService fields are mutually inclusive. (#14175)

* MM-23244: Validate that either both or neither AuthData and AuthService fields are set.

* MM-23244: Readability improvement.

* MM-23244: Adds translation. Tests for error id.

* MM-23244: Fix test.

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Martin Kraft
2020-04-09 18:51:27 -04:00
коммит произвёл GitHub
родитель bfb380630c
Коммит a9ea3587bb
4 изменённых файлов: 54 добавлений и 0 удалений

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

@@ -847,6 +847,7 @@ func TestImportImportUser(t *testing.T) {
require.NotNil(t, err, "Should have failed to import invalid user.")
data.AuthData = nil
data.AuthService = nil
err = th.App.importUser(&data, false)
require.Nil(t, err, "Should have succeeded to update valid user %v", err)