Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
Linux test workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijs2704 committed Oct 8, 2016
1 parent 80ab72c commit de8321d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/VaporAPNSTests/PayloadTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ class PayloadTests: XCTestCase { // TODO: Set this up so others can test this

func testContentAvailableWithExtrasPush() throws {
let expectedJSON = "{\"IntKey\":101,\"StringKey\":\"StringExtra1\",\"aps\":{\"content-available\":true}}"
let linuxExpectedJSON = "{\"aps\":{\"content-available\":true},\"IntKey\":101,\"StringKey\":\"StringExtra1\"}"

let payload = Payload.contentAvailable
payload.extra["StringKey"] = "StringExtra1"
payload.extra["IntKey"] = 101
let plJosn = try payload.makeJSON()
let plString = try plJosn.toString()

XCTAssertEqual(plString, expectedJSON)
XCTAssertTrue(plString == expectedJSON || plString == linuxExpectedJSON)
}

static var allTests : [(String, (PayloadTests) -> () throws -> Void)] {
Expand Down

0 comments on commit de8321d

Please sign in to comment.