mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Mm 19006 (#12616)
* Refactor to use structured logging * Properly formatted with gofmt * migrate tests to use testify * fix: swap expected and actual
This commit is contained in:
committed by
Christopher Poile
parent
4de508ec51
commit
c02b489302
@@ -7,6 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestSaveStatus(t *testing.T) {
|
||||
@@ -30,11 +31,8 @@ func TestSaveStatus(t *testing.T) {
|
||||
th.App.SaveAndBroadcastStatus(status)
|
||||
|
||||
after, err := th.App.GetStatus(user.Id)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to get status after save: %v", err)
|
||||
} else if after.Status != statusString {
|
||||
t.Fatalf("failed to save status, got %v, expected %v", after.Status, statusString)
|
||||
}
|
||||
require.Nil(t, err, "failed to get status after save: %v", err)
|
||||
require.Equal(t, statusString, after.Status, "failed to save status, got %v, expected %v", after.Status, statusString)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user