Tusker/TuskerTests/PinnedTimelineTests.swift

28 lines
626 B
Swift
Raw Permalink Normal View History

//
// PinnedTimelineTests.swift
// TuskerTests
//
// Created by Shadowfacts on 1/27/23.
// Copyright © 2023 Shadowfacts. All rights reserved.
//
import XCTest
@testable import Tusker
import Pachyderm
final class PinnedTimelineTests: XCTestCase {
func testDecodeFromTimeline() throws {
let timeline = Timeline.public(local: false)
let data = try JSONEncoder().encode(timeline)
let decoded = try JSONDecoder().decode(PinnedTimeline.self, from: data)
switch decoded {
case .public(local: false):
break
default:
XCTFail()
}
}
}