Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

822 B
Raw Blame
import Foundation
@testable import Peel
@testable import PeelCore
import Testing

struct CloudNotesTests {
    private static func download(_ name: String) -> CloudFile {
        CloudFile(
            url: URL(filePath: "/org.example/\(name)"), name: name, container: "iCloud Drive", size: 2_000_000,
            modified: nil
        )
    }

    @Test func showsTheNoteColumnWhileARowHasANote() {
        var picture = Self.download("Beach.heic")
        picture.isDesktopPicture = true

        #expect(!CloudView.hasNoteColumn([Self.download("Notes.pdf")]))
        #expect(CloudView.hasNoteColumn([Self.download("Notes.pdf"), picture]))
        #expect(picture.note != nil)
        var kept = Self.download("Trip.pdf")
        kept.heldBack = .keptDownloaded
        #expect(CloudView.hasNoteColumn([kept]))
    }
}