Skip to content

Commit 6b5f13e

Browse files
committed
test: Fix device test to not use hard coded country
1 parent 35f706b commit 6b5f13e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

UnitTests/ObjCTests/MPDeviceTests.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ - (void)testDictionaryDescription {
3333
MPUserDefaults *userDefaults = [MPUserDefaults standardUserDefaultsWithStateMachine:[MParticle sharedInstance].stateMachine backendController:[MParticle sharedInstance].backendController identity:[MParticle sharedInstance].identity];
3434
NSData *testDeviceToken = [@"<000000000000000000000000000000>" dataUsingEncoding:NSUTF8StringEncoding];
3535
userDefaults[kMPDeviceTokenKey] = testDeviceToken;
36+
37+
NSString *testCountry = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
3638

3739
MPDevice *device = [[MPDevice alloc] initWithStateMachine:[MParticle sharedInstance].stateMachine userDefaults:[MPUserDefaults standardUserDefaultsWithStateMachine:[MParticle sharedInstance].stateMachine backendController:[MParticle sharedInstance].backendController identity:[MParticle sharedInstance].identity] identity:[MParticle sharedInstance].identity];
3840
NSDictionary *testDictionary = device.dictionaryRepresentation;
3941
XCTAssertEqualObjects(testDictionary[@"dll"], @"en");
40-
XCTAssertEqualObjects(testDictionary[@"dlc"], @"US");
42+
XCTAssertEqualObjects(testDictionary[@"dlc"], testCountry);
4143
XCTAssertEqualObjects(testDictionary[@"dma"], @"Apple");
4244
XCTAssertEqualObjects(testDictionary[kMPDeviceTokenKey], @"3c3030303030303030303030303030303030303030303030303030303030303e");
4345
#endif

0 commit comments

Comments
 (0)