add test for extraHeaders on objc

This commit is contained in:
Erik Little 2018-06-05 10:41:39 -04:00
parent 6564d1a0c5
commit d07441e7fa
No known key found for this signature in database
GPG Key ID: 62F837E56F4E9320

View File

@ -13,9 +13,18 @@
- (void)testSettingConfig {
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost"];
self.manager = [[TestManager alloc] initWithSocketURL:url config:@{@"forceNew": @YES}];
NSDictionary* headers = @{@"My Header": @"Some Value"};
self.manager = [[TestManager alloc] initWithSocketURL:url config:@{
@"forceNew": @YES,
@"extraHeaders": headers
}];
[self.manager connect];
XCTAssertTrue(self.manager.forceNew);
XCTAssertTrue([self.manager.engine.extraHeaders isEqualToDictionary:headers]);
}
- (void)testManagerProperties {