File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ enum Mastodon {
3131 components. scheme = " https "
3232 components. host = apiHost
3333 components. path = apiPath
34- components. queryItems = [ URLQueryItem ( name: " status " , value: message) ]
34+ components. queryItems = [
35+ URLQueryItem ( name: " status " , value: message) ,
36+ URLQueryItem ( name: " visibility " , value: " unlisted " )
37+ ]
3538 guard let url = components. string else {
3639 throw Social . Error. invalidURL
3740 }
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ import XCTVapor
2121
2222final class MastodonTests : AppTestCase {
2323
24+ func test_apiURL( ) throws {
25+ let url = try Mastodon . apiURL ( with: " message " )
26+ XCTAssert ( url. contains ( " visibility=unlisted " ) , " was: \( url) " )
27+ }
28+
2429 func test_endToEnd( ) async throws {
2530 let message = QueueIsolated < String ? > ( nil )
2631 try await withDependencies {
You can’t perform that action at this time.
0 commit comments