X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/6d96a69d33eb634f61f809001aca19ae57113180:/layout_test.go..7b6d0a81e0f3c8e33b1b76d5ecbc5bdb25a87249:/view_layout_test.go diff --git a/layout_test.go b/view_layout_test.go similarity index 88% rename from layout_test.go rename to view_layout_test.go index 3fab197..58c0e1f 100644 --- a/layout_test.go +++ b/view_layout_test.go @@ -8,8 +8,8 @@ import ( ) func TestViewLayoutKeepsTheMessagesItSent(t *testing.T) { - path := filepath.Join(t.TempDir(), layoutFileName) - layout, err := loadLayout(path) + path := filepath.Join(t.TempDir(), viewLayoutFileName) + layout, err := loadViewLayout(path) require.NoError(t, err) texts, err := layout.Split(nil) @@ -21,7 +21,7 @@ func TestViewLayoutKeepsTheMessagesItSent(t *testing.T) { require.Equal(t, []string{"\n", "0+1|a\n1+1|b\n"}, texts) // The same lines give the same messages, also after a restart. - layout, err = loadLayout(path) + layout, err = loadViewLayout(path) require.NoError(t, err) texts, err = layout.Split([]string{"0+1|a\n", "1+1|b\n"}) @@ -34,7 +34,7 @@ func TestViewLayoutKeepsTheMessagesItSent(t *testing.T) { } func TestViewLayoutStartsAgainAtAChangedMessage(t *testing.T) { - layout, err := loadLayout(filepath.Join(t.TempDir(), layoutFileName)) + layout, err := loadViewLayout(filepath.Join(t.TempDir(), viewLayoutFileName)) require.NoError(t, err) _, err = layout.Split([]string{"0+1|a\n"})