mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 17:12:23 +01:00
28 lines
806 B
Swift
28 lines
806 B
Swift
//
|
|
// FeedlyResourceIdTests.swift
|
|
// AccountTests
|
|
//
|
|
// Created by Kiel Gillard on 3/10/19.
|
|
// Copyright © 2019 Ranchero Software, LLC. All rights reserved.
|
|
//
|
|
|
|
import XCTest
|
|
@testable import Account
|
|
|
|
class FeedlyResourceIdTests: XCTestCase {
|
|
|
|
func testFeedResourceId() {
|
|
let expectedUrl = "http://ranchero.com/blog/atom.xml"
|
|
|
|
let feedResource = FeedlyFeedResourceId(id: "feed/\(expectedUrl)")
|
|
let urlResource = FeedlyFeedResourceId(id: expectedUrl)
|
|
let otherResource = FeedlyFeedResourceId(id: "whiskey/\(expectedUrl)")
|
|
let invalidResource = FeedlyFeedResourceId(id: "")
|
|
|
|
XCTAssertEqual(feedResource.url, expectedUrl)
|
|
XCTAssertEqual(urlResource.url, expectedUrl)
|
|
XCTAssertEqual(otherResource.url, otherResource.id)
|
|
XCTAssertEqual(invalidResource.url, invalidResource.id)
|
|
}
|
|
}
|