1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-02 09:17:55 -04:00
v2fly/app/log/internal/log_entry_test.go
2017-02-01 21:35:40 +01:00

26 lines
511 B
Go

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