package main

import (
	"fmt"
	"log"
	"testing"
)

func TestCreatePermQR(t *testing.T) {
	SetupConfig()
	r, e := CreateProfileEditQR()
	AssertEqual(t, e, nil, "Create QR code should not have error")
	log.Println("qr ticket = " + r.Ticket)
	log.Println("qr URL    = " + r.URL)
	log.Println(fmt.Sprintf("qr expire = %d", r.Expire))

}

func TestCreateTempQr(t *testing.T) {
	SetupConfig()
	r, e := CreateTempQr(000, 2592001)
	AssertEqual(t, e, nil, "Create Temp QR should be success")
	log.Println("qr ticket = " + r.Ticket)
	log.Println("qr URL    = " + r.URL)
	log.Println(qrImgByTicket(r.Ticket))
	log.Println(fmt.Sprintf("qr expire = %d", r.Expire))
}
