Adding changes to separate unit tests and integration tests (#13670)
* Introducing unit (not integration) tests for the app layer * Initial support for unit tests at the API * Adding unit tests support to the store layer * Add unit tests support in commands * Adding last tests needed for run unit tests properly * Fixing govet * Removing some duplication * Fixing tests * Fixing tests * Not compiling test helpers with the main module for api * Revert "Not compiling test helpers with the main module for api" This reverts commit 36a199bbe0f7503f665f5d6c7b41c53aabc2e54f. * Fixing tests * Fixing unit tests * More consistency between api4/apiteslib.go and app/helper_test.go * Renaming things to make more obvious the new Setup functions purpose * Reverting change in go.sum * Start with empty mock for app layer * Start with empty mock for api layer * Start with empty mock for web layer * Renaming SetupWithStoreMockConfig to SetupConfigWithStoreMock * Fixing tests on web package * Removing unnecesary function
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cd36c9f041
Коммит
7035e09fe9
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHandleNewNotifications(t *testing.T) {
|
||||
th := Setup(t)
|
||||
th := SetupWithStoreMock(t)
|
||||
defer th.TearDown()
|
||||
|
||||
id1 := model.NewId()
|
||||
@@ -265,7 +265,7 @@ func TestCheckPendingNotificationsCantParseInterval(t *testing.T) {
|
||||
* Ensures that post contents are not included in notification email when email notification content type is set to generic
|
||||
*/
|
||||
func TestRenderBatchedPostGeneric(t *testing.T) {
|
||||
th := Setup(t)
|
||||
th := SetupWithStoreMock(t)
|
||||
defer th.TearDown()
|
||||
|
||||
var post = &model.Post{}
|
||||
@@ -290,7 +290,7 @@ func TestRenderBatchedPostGeneric(t *testing.T) {
|
||||
* Ensures that post contents included in notification email when email notification content type is set to full
|
||||
*/
|
||||
func TestRenderBatchedPostFull(t *testing.T) {
|
||||
th := Setup(t)
|
||||
th := SetupWithStoreMock(t)
|
||||
defer th.TearDown()
|
||||
|
||||
var post = &model.Post{}
|
||||
|
||||
Ссылка в новой задаче
Block a user