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/common/log/internal/log_entry_test.go

26 lines
540 B

9 years ago
package internal_test
import (
"testing"
. "github.com/v2ray/v2ray-core/common/log/internal"
"github.com/v2ray/v2ray-core/testing/assert"
)
func TestAccessLog(t *testing.T) {
9 years ago
assert := assert.On(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()
9 years ago
assert.String(entryStr).Contains("test_from")
assert.String(entryStr).Contains("test_to")
assert.String(entryStr).Contains("test_reason")
assert.String(entryStr).Contains("Accepted")
9 years ago
}