Adds testDefaultHeaders.
This commit is contained in:
parent
b93004589a
commit
8748004f19
1 changed files with 8 additions and 0 deletions
|
|
@ -35,6 +35,14 @@
|
|||
|
||||
#pragma mark -
|
||||
|
||||
- (void)testDefaultHeaders {
|
||||
[self.client setDefaultHeader:@"x-some-key" value:@"SomeValue"];
|
||||
expect([self.client defaultValueForHeader:@"x-some-key"]).to.equal(@"SomeValue");
|
||||
|
||||
NSMutableURLRequest *request = [self.client requestWithMethod:@"GET" path:@"/path" parameters:nil];
|
||||
expect([request valueForHTTPHeaderField:@"x-some-key"]).to.equal(@"SomeValue");
|
||||
}
|
||||
|
||||
- (void)testThatTheDefaultStringEncodingIsUTF8 {
|
||||
expect(self.client.stringEncoding).to.equal(NSUTF8StringEncoding);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue