[ios] Reset access token state after running tests
This commit is contained in:
@@ -9,6 +9,14 @@
|
||||
|
||||
@implementation MGLAttributionInfoTests
|
||||
|
||||
- (void)setUp {
|
||||
[MGLAccountManager setAccessToken:@"pk.feedcafedeadbeefbadebede"];
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
[MGLAccountManager setAccessToken:nil];
|
||||
}
|
||||
|
||||
- (void)testParsing {
|
||||
static NSString * const htmlStrings[] = {
|
||||
@"<a href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\">© Mapbox</a> "
|
||||
@@ -50,7 +58,7 @@
|
||||
XCTAssertEqualObjects([infos[3] feedbackURLAtCenterCoordinate:mapbox zoomLevel:14],
|
||||
[NSURL URLWithString:@"https://apps.mapbox.com/feedback/?referrer=com.mapbox.Mapbox#/77.63680/12.98108/14.00/0.0/0"]);
|
||||
XCTAssertEqualObjects([infos[3] feedbackURLForStyleURL:styleURL atCenterCoordinate:mapbox zoomLevel:3.14159 direction:90.9 pitch:12.5],
|
||||
[NSURL URLWithString:@"https://apps.mapbox.com/feedback/?referrer=com.mapbox.Mapbox&owner=mapbox&id=satellite-streets-v99&access_token&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]);
|
||||
[NSURL URLWithString:@"https://apps.mapbox.com/feedback/?referrer=com.mapbox.Mapbox&owner=mapbox&id=satellite-streets-v99&access_token=pk.feedcafedeadbeefbadebede&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]);
|
||||
}
|
||||
|
||||
- (void)testStyle {
|
||||
|
||||
@@ -36,6 +36,7 @@ static MGLMapView *mapView;
|
||||
|
||||
+ (void)tearDown {
|
||||
mapView = nil;
|
||||
[MGLAccountManager setAccessToken:nil];
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
self.renderFinishedExpectation = nil;
|
||||
self.mapView = nil;
|
||||
self.style = nil;
|
||||
[MGLAccountManager setAccessToken:nil];
|
||||
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
- (void)tearDown {
|
||||
self.styleLoadingExpectation = nil;
|
||||
self.mapView = nil;
|
||||
[MGLAccountManager setAccessToken:nil];
|
||||
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
- (void)tearDown {
|
||||
self.mapView = nil;
|
||||
[MGLAccountManager setAccessToken:nil];
|
||||
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user