Skip to content

Commit

Permalink
Fixed config unit test, make them use Theme and NewConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
anvial committed Nov 2, 2022
1 parent 38fb4a8 commit f18d70f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func Test_newConfig(t *testing.T) {
noTitle: false,
debug: false,
},
theme: theme{
Theme: theme{
Theme: tview.Theme{
PrimitiveBackgroundColor: 0,
ContrastBackgroundColor: 0,
Expand Down Expand Up @@ -196,8 +196,8 @@ text = "white"
c.runtime.cmd = "ls"
c.runtime.args = []string{}

c.theme.PrimitiveBackgroundColor = tcell.ColorBlack
c.theme.PrimaryTextColor = tcell.ColorWhite
c.Theme.PrimitiveBackgroundColor = tcell.ColorBlack
c.Theme.PrimaryTextColor = tcell.ColorWhite

return c
}(),
Expand All @@ -211,7 +211,7 @@ text = "white"
v.SetConfigType("toml")
assert.NoError(t, v.ReadConfig(bytes.NewBufferString(tt.configFile)))

got, err := newConfig(v, tt.args)
got, err := NewConfig(v, tt.args)
assert.Equal(t, tt.expErr, err)
assert.Equal(t, &tt.want, got)
})
Expand Down

0 comments on commit f18d70f

Please sign in to comment.