summaryrefslogtreecommitdiffstats
path: root/pkg/theme/theme_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/theme/theme_test.go')
-rw-r--r--pkg/theme/theme_test.go63
1 files changed, 0 insertions, 63 deletions
diff --git a/pkg/theme/theme_test.go b/pkg/theme/theme_test.go
deleted file mode 100644
index 311289408..000000000
--- a/pkg/theme/theme_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package theme
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestGetHexColorValues(t *testing.T) {
- scenarios := []struct {
- name string
- hexColor string
- rgb []int32
- valid bool
- }{
- {
- name: "valid uppercase hex color",
- hexColor: "#00FF00",
- rgb: []int32{0, 255, 0},
- valid: true,
- },
- {
- name: "valid lowercase hex color",
- hexColor: "#00ff00",
- rgb: []int32{0, 255, 0},
- valid: true,
- },
- {
- name: "valid short hex color",
- hexColor: "#0bf",
- rgb: []int32{0, 187, 255},
- valid: true,
- },
- {
- name: "invalid hex value",
- hexColor: "#zz00ff",
- valid: false,
- },
- {
- name: "invalid length hex color",
- hexColor: "#",
- valid: false,
- },
- {
- name: "invalid length hex color",
- hexColor: "#aaaaaaaaaaa",
- valid: false,
- },
- }
-
- for _, s := range scenarios {
- s := s
- t.Run(s.name, func(t *testing.T) {
- r, g, b, valid := getHexColorValues(s.hexColor)
- assert.EqualValues(t, s.valid, valid, s.hexColor)
- if valid {
- assert.EqualValues(t, s.rgb[0], r, s.hexColor)
- assert.EqualValues(t, s.rgb[1], g, s.hexColor)
- assert.EqualValues(t, s.rgb[2], b, s.hexColor)
- }
- })
- }
-}