Update tests for access token changes

This commit is contained in:
Jason Wray
2015-05-21 03:13:55 -07:00
parent a91b1d73e2
commit dfd6ff00a2
4 changed files with 5 additions and 10 deletions

View File

@@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>MGLMapboxAccessToken</key>
<string>pk.eyJ1IjoianVzdGluIiwiYSI6Ik9RX3RRQzAifQ.dmOg_BAp1ywuDZMM7YsXRg</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
@@ -34,6 +36,8 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MGLMapboxMetricsEnabledSettingShownInApp</key>
<true/>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>

View File

@@ -13,8 +13,6 @@
wrapper.toolbarHidden = YES;
[self.window makeKeyAndVisible];
[MGLAccountManager setMapboxMetricsEnabledSettingShownInApp:YES]; // a lie, but a convenient one
return YES;
}

View File

@@ -10,8 +10,7 @@
{
[super viewDidLoad];
_mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds
accessToken:@"pk.eyJ1IjoianVzdGluIiwiYSI6Ik9RX3RRQzAifQ.dmOg_BAp1ywuDZMM7YsXRg"];
_mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds];
_mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:_mapView];

View File

@@ -60,12 +60,6 @@
XCTAssertEqualObjects([[MGLMapboxEvents sharedManager] appBundleId], @"com.mapbox.Mapbox-GL-Tests");
}
- (void)testTokenSetViaMapView {
[tester.mapView setAccessToken:@"test_token"];
XCTAssertEqualObjects([[MGLMapboxEvents sharedManager] token], @"test_token");
}
- (void)testResumeMetricsCollection {
[MGLMapboxEvents resumeMetricsCollection];