1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-20 04:04:15 -04:00
v2fly/app/log/internal/log_entry_test.go
2017-10-24 16:15:35 +02:00

26 lines
491 B
Go

package internal_test
import (
"testing"
. "v2ray.com/core/app/log/internal"
. "v2ray.com/ext/assert"
)
func TestAccessLog(t *testing.T) {
assert := With(t)
entry := &AccessLog{
From: "test_from",
To: "test_to",
Status: "Accepted",
Reason: "test_reason",
}
entryStr := entry.String()
assert(entryStr, HasSubstring, "test_from")
assert(entryStr, HasSubstring, "test_to")
assert(entryStr, HasSubstring, "test_reason")
assert(entryStr, HasSubstring, "Accepted")
}