diff --git a/xcode/Subconscious/SubconsciousTests/Tests_Sphere.swift b/xcode/Subconscious/SubconsciousTests/Tests_Sphere.swift index ac1039a9..3762e76d 100644 --- a/xcode/Subconscious/SubconsciousTests/Tests_Sphere.swift +++ b/xcode/Subconscious/SubconsciousTests/Tests_Sphere.swift @@ -448,76 +448,6 @@ final class Tests_Sphere: XCTestCase { } } - func testWritesThenCloseThenReopenWithVars() async throws { - let base = UUID() - - let globalStoragePath = try createTmpDir(path: "\(base)/noosphere") - .path() - - let sphereStoragePath = try createTmpDir(path: "\(base)/sphere") - .path() - - var noosphere = try Noosphere( - globalStoragePath: globalStoragePath, - sphereStoragePath: sphereStoragePath - ) - - let sphereReceipt = try await noosphere.createSphere( - ownerKeyName: "bob" - ) - - let sphereIdentity = sphereReceipt.identity - - var sphere = try Sphere( - noosphere: noosphere, - identity: sphereReceipt.identity - ) - - let versionA0 = try await sphere.version() - - let body = try "Test content".toData().unwrap() - let contentType = "text/subtext" - try await sphere.write( - slug: Slug("a")!, - contentType: contentType, - body: body - ) - - let versionA1 = try await sphere.save() - - try await sphere.write( - slug: Slug("b")!, - contentType: contentType, - body: body - ) - try await sphere.write( - slug: Slug("c")!, - contentType: contentType, - body: body - ) - let versionA2 = try await sphere.save() - - let versionAN = try await sphere.version() - - XCTAssertNotEqual(versionA0, versionAN) - XCTAssertNotEqual(versionA1, versionAN) - XCTAssertEqual(versionA2, versionAN) - - // Overwrite var with new instance - noosphere = try Noosphere( - globalStoragePath: globalStoragePath, - sphereStoragePath: sphereStoragePath - ) - // Overwrite sphere with new sphere - sphere = try Sphere( - noosphere: noosphere, - identity: sphereIdentity - ) - let versionB0 = try await sphere.version() - - XCTAssertEqual(versionB0, versionAN) - } - func testPetnameRoundtrip() async throws { let base = UUID()