You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/app/log/internal/log_entry_test.go

26 lines
491 B

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