]> git.giacomolli.uk - onechat/blobdiff - view_layout_test.go
Name and order the view code
[onechat] / view_layout_test.go
similarity index 88%
rename from layout_test.go
rename to view_layout_test.go
index 3fab19760d5c3c83227d72c371246a5a36d15504..58c0e1f8ac3bc511dcb9326d23718e71bc55575a 100644 (file)
@@ -8,8 +8,8 @@ import (
 )
 
 func TestViewLayoutKeepsTheMessagesItSent(t *testing.T) {
 )
 
 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)
        require.NoError(t, err)
 
        texts, err := layout.Split(nil)
@@ -21,7 +21,7 @@ func TestViewLayoutKeepsTheMessagesItSent(t *testing.T) {
        require.Equal(t, []string{"<chat>\n", "0+1|a\n1+1|b\n"}, texts)
 
        // The same lines give the same messages, also after a restart.
        require.Equal(t, []string{"<chat>\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"})
        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) {
 }
 
 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"})
        require.NoError(t, err)
 
        _, err = layout.Split([]string{"0+1|a\n"})