mirror of
https://github.com/openai/codex.git
synced 2026-05-02 04:11:39 +03:00
Refactor config types into a separate crate (#16962)
Move config types into a separate crate because their macros expand into a lot of new code.
This commit is contained in:
@@ -198,16 +198,11 @@ fn enable_fanout_normalization_enables_multi_agent_one_way() {
|
||||
#[test]
|
||||
fn apps_require_feature_flag_and_chatgpt_auth() {
|
||||
let mut features = Features::with_defaults();
|
||||
assert!(!features.apps_enabled_for_auth(/*auth*/ None));
|
||||
assert!(!features.apps_enabled_for_auth(/*has_chatgpt_auth*/ false));
|
||||
|
||||
features.enable(Feature::Apps);
|
||||
assert!(!features.apps_enabled_for_auth(/*auth*/ None));
|
||||
|
||||
let api_key_auth = codex_login::CodexAuth::from_api_key("test-api-key");
|
||||
assert!(!features.apps_enabled_for_auth(Some(&api_key_auth)));
|
||||
|
||||
let chatgpt_auth = codex_login::CodexAuth::create_dummy_chatgpt_auth_for_testing();
|
||||
assert!(features.apps_enabled_for_auth(Some(&chatgpt_auth)));
|
||||
assert!(!features.apps_enabled_for_auth(/*has_chatgpt_auth*/ false));
|
||||
assert!(features.apps_enabled_for_auth(/*has_chatgpt_auth*/ true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user