Skip to content

Commit

Permalink
Add test case for store.pulse/current.pulse/logs.sqlite situation
Browse files Browse the repository at this point in the history
  • Loading branch information
AgapovOne committed Oct 15, 2021
1 parent 3567981 commit 8528ee0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Pulse/Tests/PulseTests/LoggerStoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@ final class LoggerStoreTests: XCTestCase {
XCTAssertEqual(try store.allNetworkRequests().count, 4)
}

func testInitWithPackageURLAndStoreInsideAnotherFolder() throws {
// GIVEN
let storeURL = try XCTUnwrap(Bundle.module.url(forResource: "some.bundle", withExtension: "pulse")?.appendingPathComponent("current.pulse"))

// WHEN
let store = try XCTUnwrap(LoggerStore(storeURL: storeURL))

// THEN
XCTAssertEqual(try store.allMessages().count, 23)
XCTAssertEqual(try store.allNetworkRequests().count, 4)
}

// MARK: - Copy (Directory)

func testCopyDirectory() throws {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Error 404</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"access-token": "a1",
"refresh-token": "m1",
"profile": {
"id": 1,
"name": "kean",
"repos": ["Nuke", "Pulse", "Align"],
"hireable": false,
"email": null
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"device":{"systemVersion":"14.4","systemName":"iOS","model":"iPhone","name":"iPod touch (7th generation)","localizedModel":"iPhone"},"archivedDate":637809724.92740703,"blobsSize":114873,"id":"DD2E1B81-50C8-48A4-834D-A28F936BF4F0","databaseSize":77824,"createdDate":637809724.86362576,"modifiedDate":637809724.88752329,"messageCount":23,"storeVersion":"1.0.0","requestCount":4}

0 comments on commit 8528ee0

Please sign in to comment.