Skip to content

Commit cabc799

Browse files
committed
codecov
1 parent 8c49a11 commit cabc799

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/ParseSwiftTests/ParsePointerTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@ class ParsePointerTests: XCTestCase {
6060
XCTAssertEqual(pointer.objectId, initializedPointer.objectId)
6161
}
6262

63+
func testPointerNoObjectId() throws {
64+
let score = GameScore(score: 10)
65+
XCTAssertThrowsError(try Pointer(score))
66+
}
67+
68+
func testPointerObjectId() throws {
69+
let score = Pointer<GameScore>(objectId: "yarr")
70+
var score2 = GameScore(score: 10)
71+
score2.objectId = "yarr"
72+
let pointer = try score2.toPointer()
73+
XCTAssertEqual(pointer.className, score.className)
74+
XCTAssertEqual(pointer.objectId, score.objectId)
75+
}
76+
6377
// swiftlint:disable:next function_body_length
6478
func testFetch() throws {
6579
var score = GameScore(score: 10)

0 commit comments

Comments
 (0)