-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from sandammeer/feature/issue-components
Add parsing of components
- Loading branch information
Showing
3 changed files
with
95 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// JiraSwiftTest.swift | ||
// JiraSwiftTests | ||
// | ||
// Created by Sandro Wehrhahn on 05.03.19. | ||
// | ||
|
||
|
||
import XCTest | ||
|
||
|
||
class JiraSwiftTest: XCTestCase { | ||
|
||
func jiraCredentialsFromEnvironment() -> (URL, String, String) { | ||
guard let jiraUsername = ProcessInfo.processInfo.environment["jiraUsername"], | ||
let jiraPassword = ProcessInfo.processInfo.environment["jiraPassword"], | ||
let urlString = ProcessInfo.processInfo.environment["jiraURL"], | ||
let jiraURL = URL(string: urlString) | ||
else { | ||
fatalError() | ||
} | ||
|
||
return (jiraURL, jiraUsername, jiraPassword) | ||
} | ||
|
||
func jiraOAuthTokenFromCredentials() -> (URL, String) { | ||
guard let urlString = ProcessInfo.processInfo.environment["jiraURL"], | ||
let jiraURL = URL(string: urlString), | ||
let oAuthToken = ProcessInfo.processInfo.environment["jiraOAuthToken"] | ||
else { | ||
fatalError() | ||
} | ||
|
||
return (jiraURL, oAuthToken) | ||
} | ||
|
||
} |