mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-05 00:26:39 +00:00
27 lines
413 B
Go
27 lines
413 B
Go
package cmd
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
)
|
|
|
|
func TestPrintQRCode_EmptyURL(t *testing.T) {
|
|
var buf bytes.Buffer
|
|
|
|
printQRCode(&buf, "")
|
|
|
|
if buf.Len() != 0 {
|
|
t.Error("expected no output for empty URL")
|
|
}
|
|
}
|
|
|
|
func TestPrintQRCode_WritesOutput(t *testing.T) {
|
|
var buf bytes.Buffer
|
|
|
|
printQRCode(&buf, "https://example.com/auth")
|
|
|
|
if buf.Len() == 0 {
|
|
t.Error("expected QR code output for non-empty URL")
|
|
}
|
|
}
|