Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Aug 19, 2023
1 parent b748a8f commit 316f98a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/CoreModelTests/CoreDataTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ final class CoreDataTests: XCTestCase {
people: [person1.id]
)

let event1Data = try event1.encode(log: { print("CoreModel Encoder:", $0) })
var event1Data = try event1.encode(log: { print("Encoder:", $0) })
try await store.insert(event1Data)
person1 = try await store.fetch(Person.self, for: person1.id)!
XCTAssertEqual(person1.events, [event1.id])
event1 = try await store.fetch(Event.self, for: event1.id)!
event1Data = try await store.fetch(Event.entityName, for: ObjectID(event1.id))!
event1 = try .init(from: event1Data, log: { print("Decoder:", $0) })
XCTAssertEqual(event1.people, [person1.id])
}
}
Expand Down

0 comments on commit 316f98a

Please sign in to comment.