21 lines
381 B
Go
21 lines
381 B
Go
package model
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func pp(result, expected any) error {
|
|
return fmt.Errorf("result: %v, expected: %v", result, expected)
|
|
}
|
|
|
|
func TestCheckBoxURL(t *testing.T) {
|
|
boxURL, err := CheckBoxURL("123123")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if result, expected := fmt.Sprintf("%s", boxURL), "123123"; result != expected {
|
|
t.Fatal(pp(result, expected))
|
|
}
|
|
}
|