Triton/Packages/Pastebin/Sources/Pastebin/Fixtures/PasteMother.swift
Otavio Cordeiro ee174ab836 Add SwiftLint
2026-01-14 12:30:53 -03:00

31 lines
688 B
Swift

#if DEBUG
import PastebinPersistenceService
import SwiftData
extension Paste {
// MARK: - Public
@MainActor
static func makePaste(
count: Int,
in container: ModelContainer
) {
for index in 0..<count {
let paste = Paste(
title: "paste\(index).md",
content: "hello, world!",
timestamp: 123_123_123,
address: "otaviocc",
listed: index % 2 == 0
)
container.mainContext.insert(
paste
)
}
}
}
#endif