@@ -18,7 +18,7 @@ var (
|
||||
// LogAccess is log server request log
|
||||
LogAccess *logrus.Logger
|
||||
// LogError is log server error log
|
||||
LogError *logrus.Logger
|
||||
LogError *logrus.Logger
|
||||
// RushStatus is notification status
|
||||
RushStatus StatusApp
|
||||
)
|
||||
|
||||
@@ -340,13 +340,13 @@ func TestSenMultipleNotifications(t *testing.T) {
|
||||
req := RequestPush{
|
||||
Notifications: []PushNotification{
|
||||
//ios
|
||||
PushNotification{
|
||||
{
|
||||
Tokens: []string{"11aa01229f15f0f0c52029d8cf8cd0aeaf2365fe4cebc4af26cd6d76b7919ef7"},
|
||||
Platform: 1,
|
||||
Message: "Welcome",
|
||||
},
|
||||
// android
|
||||
PushNotification{
|
||||
{
|
||||
Tokens: []string{androidToken, "bbbbb"},
|
||||
Platform: 2,
|
||||
Message: "Welcome",
|
||||
@@ -373,13 +373,13 @@ func TestDisabledAndroidNotifications(t *testing.T) {
|
||||
req := RequestPush{
|
||||
Notifications: []PushNotification{
|
||||
//ios
|
||||
PushNotification{
|
||||
{
|
||||
Tokens: []string{"11aa01229f15f0f0c52029d8cf8cd0aeaf2365fe4cebc4af26cd6d76b7919ef7"},
|
||||
Platform: 1,
|
||||
Message: "Welcome",
|
||||
},
|
||||
// android
|
||||
PushNotification{
|
||||
{
|
||||
Tokens: []string{androidToken, "bbbbb"},
|
||||
Platform: 2,
|
||||
Message: "Welcome",
|
||||
@@ -406,13 +406,13 @@ func TestDisabledIosNotifications(t *testing.T) {
|
||||
req := RequestPush{
|
||||
Notifications: []PushNotification{
|
||||
//ios
|
||||
PushNotification{
|
||||
{
|
||||
Tokens: []string{"11aa01229f15f0f0c52029d8cf8cd0aeaf2365fe4cebc4af26cd6d76b7919ef7"},
|
||||
Platform: 1,
|
||||
Message: "Welcome",
|
||||
},
|
||||
// android
|
||||
PushNotification{
|
||||
{
|
||||
Tokens: []string{androidToken, "bbbbb"},
|
||||
Platform: 2,
|
||||
Message: "Welcome",
|
||||
|
||||
@@ -154,12 +154,12 @@ func TestOutOfRangeMaxNotifications(t *testing.T) {
|
||||
r.POST("/api/push").
|
||||
SetJSON(gofight.D{
|
||||
"notifications": []gofight.D{
|
||||
gofight.D{
|
||||
{
|
||||
"tokens": []string{"aaaaa", "bbbbb"},
|
||||
"platform": 2,
|
||||
"message": "Welcome",
|
||||
},
|
||||
gofight.D{
|
||||
{
|
||||
"tokens": []string{"aaaaa", "bbbbb"},
|
||||
"platform": 2,
|
||||
"message": "Welcome",
|
||||
@@ -185,7 +185,7 @@ func TestSuccessPushHandler(t *testing.T) {
|
||||
r.POST("/api/push").
|
||||
SetJSON(gofight.D{
|
||||
"notifications": []gofight.D{
|
||||
gofight.D{
|
||||
{
|
||||
"tokens": []string{androidToken, "bbbbb"},
|
||||
"platform": 2,
|
||||
"message": "Welcome",
|
||||
|
||||
Reference in New Issue
Block a user