mirror of
https://github.com/elyby/chrly.git
synced 2024-12-11 15:59:18 +05:30
3d65529d2e
Исправлена опечатка в тесте Разделена логика метода BuildNonElyTexturesHash
23 lines
515 B
Go
23 lines
515 B
Go
package tools_test
|
|
|
|
import (
|
|
"testing"
|
|
. "elyby/minecraft-skinsystem/lib/tools"
|
|
)
|
|
|
|
func TestParseUsername(t *testing.T) {
|
|
if ParseUsername("test.png") != "test" {
|
|
t.Error("Function should trim .png at end")
|
|
}
|
|
|
|
if ParseUsername("test") != "test" {
|
|
t.Error("Function should return string itself, if it not contains .png at end")
|
|
}
|
|
}
|
|
|
|
func TestBuildKey(t *testing.T) {
|
|
if BuildKey("Test") != "username:test" {
|
|
t.Error("Function shound convert string to lower case and concatenate it with usernmae:")
|
|
}
|
|
}
|