Removed unnecessary conversions (#7557)
No need to convert to the same type.
This commit is contained in:
parent
2f75766532
commit
54d96c79b5
24 changed files with 39 additions and 46 deletions
|
@ -31,7 +31,7 @@ func TestRender_StandardLinks(t *testing.T) {
|
|||
|
||||
test := func(input, expected, expectedWiki string) {
|
||||
buffer := RenderString(input, setting.AppSubURL, nil)
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(string(buffer)))
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer))
|
||||
bufferWiki := RenderWiki([]byte(input), setting.AppSubURL, nil)
|
||||
assert.Equal(t, strings.TrimSpace(expectedWiki), strings.TrimSpace(bufferWiki))
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ func TestRender_Images(t *testing.T) {
|
|||
|
||||
test := func(input, expected string) {
|
||||
buffer := RenderString(input, setting.AppSubURL, nil)
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(string(buffer)))
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer))
|
||||
}
|
||||
|
||||
url := "../../.images/src/02/train.jpg"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue