swiftgemini

[ACTIVE] gemini protocol in swift
git clone git://git.figbert.com/swiftgemini.git
Log | Files | Refs | README

SwiftGeminiTests.swift (542B)


      1 import XCTest
      2 @testable import SwiftGemini
      3 
      4 final class SwiftGeminiTests: XCTestCase {
      5     func testFigbertDotCom() async {
      6         let engine = GeminiRequestor()
      7         let test = try! await engine.request(url: URL(string: "gemini://figbert.com")!)
      8         XCTAssertEqual(URL(string: "gemini://figbert.com"), test.url)
      9         XCTAssertEqual(test.status, StatusCode.Success)
     10         XCTAssertEqual(test.body!.gemtext!.prefix(13), "# Hello World")
     11     }
     12 
     13     static var allTests = [
     14         ("testFigbertDotCom", testFigbertDotCom),
     15     ]
     16 }