Skip to content

Commit

Permalink
Change generic location payload schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Nov 26, 2024
1 parent 0053fdd commit 8e75831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import CoreLocation

open class LocationPayload: Payload {

public static let schema: String = "network.xyo.location"
public static let schema: String = "network.xyo.location.current"

var location: CLLocation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ class LocationPayloadTests: XCTestCase {
},
"timestamp" : 1609459200000
},
"schema" : "network.xyo.location"
"schema" : "network.xyo.location.current"
}
"""
XCTAssertEqual(jsonString, expectedJSON)
let hash = try BoundWitnessBuilder.hash(payload)
XCTAssertEqual(hash, "d9c4af75352658783d1b9b86d647a57d29de611261de8a3fc27019dfc3ef0dc9")
XCTAssertEqual(hash, "0c1f0c80481b0f391a677eab542a594a192081325b6416acc3dc99db23355ee2")
}

func testLocationPayloadEncodingHandlesNilValues() throws {
Expand Down Expand Up @@ -90,7 +90,7 @@ class LocationPayloadTests: XCTestCase {
},
"timestamp" : 0
},
"schema" : "network.xyo.location"
"schema" : "network.xyo.location.current"
}
"""
XCTAssertEqual(jsonString, expectedJSON)
Expand Down

0 comments on commit 8e75831

Please sign in to comment.