Skip to content

Commit

Permalink
added properties to event test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaysubra committed Sep 4, 2024
1 parent 1d8e5ab commit 66c110f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Tests/KlaviyoCoreTests/EncodableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ final class EncodableTests: XCTestCase {
}

func testEventPayload() throws {
let SAMPLE_PROPERTIES = [
"blob": "blob",
"stuff": 2,
"hello": [
"sub": "dict"
]
] as [String: Any]
let payloadData = CreateEventPayload.Event(name: "test", properties: SAMPLE_PROPERTIES, anonymousId: "anon-id")
let createEventPayload = CreateEventPayload(data: payloadData)
assertSnapshot(matching: createEventPayload, as: .json(KlaviyoEnvironment.encoder))
Expand Down
8 changes: 8 additions & 0 deletions Tests/KlaviyoCoreTests/TestUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ let TEST_FAILURE_JSON_INVALID_EMAIL = """
}
"""

let SAMPLE_PROPERTIES = [
"blob": "blob",
"stuff": 2,
"hello": [
"sub": "dict"
]
] as [String: Any]

extension ArchiverClient {
static let test = ArchiverClient(
archivedData: { _, _ in ARCHIVED_RETURNED_DATA },
Expand Down

0 comments on commit 66c110f

Please sign in to comment.