Skip to content

Commit 1562cd0

Browse files
committed
Update tests.
1 parent 6939208 commit 1562cd0

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

IdentityCore/tests/MSIDAADV1WebviewFactoryTests.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#import "MSIDPkce.h"
3636
#import "MSIDInteractiveTokenRequestParameters.h"
3737
#import "MSIDAccountIdentifier.h"
38+
#import "MSIDFlightManager.h"
39+
#import "MSIDConstants.h"
3840

3941
@interface MSIDAADV1WebviewFactoryTests : XCTestCase
4042

@@ -77,6 +79,12 @@ - (void)testAuthorizationParametersFromParameters_withValidParams_shouldContainA
7779
}];
7880

7981
[expectedQPs addEntriesFromDictionary:[MSIDDeviceId deviceId]];
82+
#if TARGET_OS_IPHONE
83+
if ([MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_SUPPORT_DUNA_CBA])
84+
{
85+
expectedQPs[@"switch_browser"] = @"1";
86+
}
87+
#endif
8088

8189
XCTAssertTrue([expectedQPs compareAndPrintDiff:params]);
8290
}
@@ -110,6 +118,12 @@ - (void)testAuthorizationParametersFromConfiguration_withValidParamsWithScopes_s
110118
}];
111119

112120
[expectedQPs addEntriesFromDictionary:[MSIDDeviceId deviceId]];
121+
#if TARGET_OS_IPHONE
122+
if ([MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_SUPPORT_DUNA_CBA])
123+
{
124+
expectedQPs[@"switch_browser"] = @"1";
125+
}
126+
#endif
113127

114128
XCTAssertTrue([expectedQPs compareAndPrintDiff:params]);
115129
}

IdentityCore/tests/MSIDAADV2WebviewFactoryTests.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#import "MSIDPkce.h"
3636
#import "MSIDInteractiveTokenRequestParameters.h"
3737
#import "MSIDAccountIdentifier.h"
38+
#import "MSIDFlightManager.h"
39+
#import "MSIDConstants.h"
3840

3941
@interface MSIDAADV2WebviewFactoryTests : XCTestCase
4042

@@ -78,6 +80,12 @@ - (void)testAuthorizationParametersFromParameters_withValidParams_shouldContainA
7880
}];
7981

8082
[expectedQPs addEntriesFromDictionary:[MSIDDeviceId deviceId]];
83+
#if TARGET_OS_IPHONE
84+
if ([MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_SUPPORT_DUNA_CBA])
85+
{
86+
expectedQPs[@"switch_browser"] = @"1";
87+
}
88+
#endif
8189

8290
XCTAssertTrue([expectedQPs compareAndPrintDiff:params]);
8391
}

IdentityCore/tests/MSIDAADWebviewFactoryTests.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
#import "MSIDPkce.h"
4747
#import "MSIDWebAADAuthCodeResponse.h"
4848
#import "MSIDBrokerConstants.h"
49+
#import "MSIDFlightManager.h"
50+
#import "MSIDConstants.h"
4951

5052
@interface MSIDAADWebviewFactoryTests : XCTestCase
5153

@@ -98,6 +100,12 @@ - (void)testAuthorizationParametersFromParameters_withValidParams_shouldContainA
98100
@"X-AnchorMailbox" : [MSIDTestRequireValueSentinel new],
99101
}];
100102
[expectedQPs addEntriesFromDictionary:[MSIDDeviceId deviceId]];
103+
#if TARGET_OS_IPHONE
104+
if ([MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_SUPPORT_DUNA_CBA])
105+
{
106+
expectedQPs[@"switch_browser"] = @"1";
107+
}
108+
#endif
101109

102110
XCTAssertTrue([expectedQPs compareAndPrintDiff:params]);
103111
}
@@ -161,6 +169,13 @@ - (void)testAuthorizationParametersFromParameters_withInstanceAwareFlagSet_shoul
161169
@"code_challenge" : pkce.codeChallenge
162170
}];
163171
[expectedQPs addEntriesFromDictionary:[MSIDDeviceId deviceId]];
172+
#if TARGET_OS_IPHONE
173+
if ([MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_SUPPORT_DUNA_CBA])
174+
{
175+
expectedQPs[@"switch_browser"] = @"1";
176+
}
177+
#endif
178+
164179
XCTAssertTrue([expectedQPs compareAndPrintDiff:params]);
165180
}
166181

0 commit comments

Comments
 (0)