update testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
1fd41ca503
commit
b71b427786
|
@ -75,3 +75,15 @@ func TestErrorLogPath(t *testing.T) {
|
|||
|
||||
assert.NotNil(t, InitLog())
|
||||
}
|
||||
|
||||
func TestPlatFormType(t *testing.T) {
|
||||
assert.Equal(t, "ios", typeForPlatForm(PlatFormIos))
|
||||
assert.Equal(t, "android", typeForPlatForm(PlatFormAndroid))
|
||||
assert.Equal(t, "", typeForPlatForm(10000))
|
||||
}
|
||||
|
||||
func TestPlatFormColor(t *testing.T) {
|
||||
assert.Equal(t, blue, colorForPlatForm(PlatFormIos))
|
||||
assert.Equal(t, yellow, colorForPlatForm(PlatFormAndroid))
|
||||
assert.Equal(t, reset, colorForPlatForm(1000000))
|
||||
}
|
||||
|
|
|
@ -205,6 +205,8 @@ func TestAndroidPushHandler(t *testing.T) {
|
|||
|
||||
PushConf.Android.Enabled = true
|
||||
PushConf.Android.ApiKey = os.Getenv("ANDROID_API_KEY")
|
||||
// log for json
|
||||
PushConf.Log.Format = "json"
|
||||
|
||||
android_token := os.Getenv("ANDROID_TEST_TOKEN")
|
||||
|
||||
|
|
Loading…
Reference in New Issue