Making private import methos in the app layer (#13758)
* Making private import methos in the app layer * Making one more method private
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
a76643116f
Коммит
ae6f15b76f
@@ -81,42 +81,42 @@ func TestImportImportLine(t *testing.T) {
|
||||
Type: "gibberish",
|
||||
}
|
||||
|
||||
err := th.App.ImportLine(line, false)
|
||||
err := th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with invalid type.")
|
||||
|
||||
// Try import line with team type but nil team.
|
||||
line.Type = "team"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line of type team with a nil team.")
|
||||
|
||||
// Try import line with channel type but nil channel.
|
||||
line.Type = "channel"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with type channel with a nil channel.")
|
||||
|
||||
// Try import line with user type but nil user.
|
||||
line.Type = "user"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with type user with a nil user.")
|
||||
|
||||
// Try import line with post type but nil post.
|
||||
line.Type = "post"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with type post with a nil post.")
|
||||
|
||||
// Try import line with direct_channel type but nil direct_channel.
|
||||
line.Type = "direct_channel"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with type direct_channel with a nil direct_channel.")
|
||||
|
||||
// Try import line with direct_post type but nil direct_post.
|
||||
line.Type = "direct_post"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with type direct_post with a nil direct_post.")
|
||||
|
||||
// Try import line with scheme type but nil scheme.
|
||||
line.Type = "scheme"
|
||||
err = th.App.ImportLine(line, false)
|
||||
err = th.App.importLine(line, false)
|
||||
require.NotNil(t, err, "Expected an error when importing a line with type scheme with a nil scheme.")
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user