19 lines
576 B
Swift
19 lines
576 B
Swift
import MusicAssistantCore
|
|
import XCTest
|
|
|
|
final class AppConfigurationTests: XCTestCase {
|
|
func testDevelopmentConfigurationReadsKnownEnvironmentKeys() {
|
|
let configuration = AppConfiguration.development(environment: [
|
|
"MUSIC_ASSISTANT_OPENAI_API_KEY": "openai-test-key"
|
|
])
|
|
|
|
XCTAssertEqual(configuration.openAIAPIKey, "openai-test-key")
|
|
}
|
|
|
|
func testDevelopmentConfigurationAllowsMissingSecrets() {
|
|
let configuration = AppConfiguration.development(environment: [:])
|
|
|
|
XCTAssertNil(configuration.openAIAPIKey)
|
|
}
|
|
}
|