mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-24 14:35:47 +00:00
* initialized in the app * passed to dao keeper * added conversion methods (string2unixtime, byte ToJSON) * removed obsolete keeper code * maded RDDLToken.Factor public Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
16 lines
276 B
Go
16 lines
276 B
Go
package util
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestString2UnixTime(t *testing.T) {
|
|
t.Parallel()
|
|
input := "2024-03-26T11:10:41"
|
|
unixTime, err := String2UnixTime(input)
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, int64(1711451441), unixTime)
|
|
}
|