33 lines
883 B
Swift
33 lines
883 B
Swift
//
|
|
// test_date_utils.swift
|
|
// ZockerhoehleTests
|
|
//
|
|
// Created by Julian-Steffen Müller on 19.05.21.
|
|
// Copyright © 2021 Julian-Steffen Müller. All rights reserved.
|
|
//
|
|
|
|
import XCTest
|
|
@testable import Zockerhoehle
|
|
|
|
class test_date_utils: XCTestCase {
|
|
|
|
override func setUpWithError() throws {
|
|
// Put setup code here. This method is called before the invocation of each test method in the class.
|
|
}
|
|
|
|
override func tearDownWithError() throws {
|
|
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
}
|
|
|
|
func test_roundtrip_date_string() throws {
|
|
let correct_data_str = "2021-05-19T13:42:05+0200"
|
|
|
|
let date = Date.from(string: correct_data_str)
|
|
|
|
let date_str = date?.formattedInTimeZone()
|
|
|
|
XCTAssertEqual(correct_data_str, date_str)
|
|
}
|
|
|
|
}
|