Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
b7809918
Unverified
Commit
b7809918
authored
Apr 21, 2020
by
Emil Tullstedt
Committed by
GitHub
Apr 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard: Update tests for testing fallback support (#23730)
parent
df60dbd7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
pkg/models/dashboards_test.go
+14
-4
No files found.
pkg/models/dashboards_test.go
View file @
b7809918
...
...
@@ -29,10 +29,20 @@ func TestDashboardModel(t *testing.T) {
So
(
dashboard
.
Slug
,
ShouldEqual
,
"grafana-play-home"
)
})
Convey
(
"Can slugify title"
,
t
,
func
()
{
slug
:=
SlugifyTitle
(
"Grafana Play Home"
)
So
(
slug
,
ShouldEqual
,
"grafana-play-home"
)
Convey
(
"Can slugify titles"
,
t
,
func
()
{
tests
:=
map
[
string
]
string
{
"Grafana Play Home"
:
"grafana-play-home"
,
"snöräv-över-ån"
:
"snorav-over-an"
,
"漢字"
:
"han-zi"
,
// Hanzi for hanzi
"🇦🇶"
:
"8J-HpvCfh7Y"
,
// flag of Antarctica-emoji, using fallback
"𒆠"
:
"8JKGoA"
,
// cuneiform Ki, using fallback
}
for
input
,
expected
:=
range
tests
{
slug
:=
SlugifyTitle
(
input
)
So
(
slug
,
ShouldEqual
,
expected
)
}
})
Convey
(
"Given a dashboard json"
,
t
,
func
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment