From 66c110ff2417793aee73cb50270f33dd3aa8ba36 Mon Sep 17 00:00:00 2001 From: Ajay Subramanya <118314354+ajaysubra@users.noreply.github.com> Date: Tue, 3 Sep 2024 22:43:22 -0500 Subject: [PATCH] added properties to event test --- Tests/KlaviyoCoreTests/EncodableTests.swift | 7 ------- Tests/KlaviyoCoreTests/TestUtils.swift | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Tests/KlaviyoCoreTests/EncodableTests.swift b/Tests/KlaviyoCoreTests/EncodableTests.swift index c6042fd4..a88cc7e8 100644 --- a/Tests/KlaviyoCoreTests/EncodableTests.swift +++ b/Tests/KlaviyoCoreTests/EncodableTests.swift @@ -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)) diff --git a/Tests/KlaviyoCoreTests/TestUtils.swift b/Tests/KlaviyoCoreTests/TestUtils.swift index 6a2df64b..4f1c0c78 100644 --- a/Tests/KlaviyoCoreTests/TestUtils.swift +++ b/Tests/KlaviyoCoreTests/TestUtils.swift @@ -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 },