add test for extraHeaders on objc
This commit is contained in:
parent
6564d1a0c5
commit
d07441e7fa
@ -13,9 +13,18 @@
|
|||||||
|
|
||||||
- (void)testSettingConfig {
|
- (void)testSettingConfig {
|
||||||
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost"];
|
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.forceNew);
|
||||||
|
XCTAssertTrue([self.manager.engine.extraHeaders isEqualToDictionary:headers]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testManagerProperties {
|
- (void)testManagerProperties {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user