Explorar el Código

testing decoding date

master
Patrick Peng Sun hace 8 años
padre
commit
cd7c9bcdfa
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. +12
    -0
      crmMeeting_test.go

+ 12
- 0
crmMeeting_test.go Ver fichero



import ( import (
"encoding/json" "encoding/json"
"log"
"testing" "testing"
"time" "time"
) )
AssertEqual(t, deleted, true, "temp lead should have been deleted") AssertEqual(t, deleted, true, "temp lead should have been deleted")


} }

func TestDecodeDate(t *testing.T) {
layout := "2 January, 2006 15:04"
value := "23 July, 2017 10:30"
tt, err := time.Parse(layout, value)
if err != nil {
log.Print(err)
return
}
log.Println(tt)
}

Cargando…
Cancelar
Guardar