Skip to content

Commit

Permalink
Update development APNS host (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshow authored Sep 7, 2019
1 parent 4fbb779 commit da20148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

// Apple HTTP/2 Development & Production urls
const (
HostDevelopment = "https://api.development.push.apple.com"
HostDevelopment = "https://api.sandbox.push.apple.com"
HostProduction = "https://api.push.apple.com"
)

Expand Down
8 changes: 4 additions & 4 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ func (c *mockTransport) CloseIdleConnections() {

func TestClientDefaultHost(t *testing.T) {
client := apns.NewClient(mockCert())
assert.Equal(t, "https://api.development.push.apple.com", client.Host)
assert.Equal(t, "https://api.sandbox.push.apple.com", client.Host)
}

func TestTokenDefaultHost(t *testing.T) {
client := apns.NewTokenClient(mockToken()).Development()
assert.Equal(t, "https://api.development.push.apple.com", client.Host)
assert.Equal(t, "https://api.sandbox.push.apple.com", client.Host)
}

func TestClientDevelopmentHost(t *testing.T) {
client := apns.NewClient(mockCert()).Development()
assert.Equal(t, "https://api.development.push.apple.com", client.Host)
assert.Equal(t, "https://api.sandbox.push.apple.com", client.Host)
}

func TestTokenClientDevelopmentHost(t *testing.T) {
client := apns.NewTokenClient(mockToken()).Development()
assert.Equal(t, "https://api.development.push.apple.com", client.Host)
assert.Equal(t, "https://api.sandbox.push.apple.com", client.Host)
}

func TestClientProductionHost(t *testing.T) {
Expand Down

0 comments on commit da20148

Please sign in to comment.