Tests: Updating test for CPURLConnection

This test checks to make sure the CPURLConnection withCredentials functionality works.
This commit is contained in:
Andrew Hankinson committed 2014-06-23 16:14:21 -04:00
1 parent 32657793c8
commit 6c52e4936f
1 file changed
+9 -3
+9 -3
View File
@@ -20,7 +20,7 @@
- (void)testSynchronousRequestSuccess
{
var req = [CPURLRequest requestWithURL:@"Tests/Foundation/CPURLConnectionTest.j"],
var req = [CPURLRequest requestWithURL:@"Tests/Foundation/CPURLConnectionTest.j"],
data = [CPURLConnection sendSynchronousRequest:req returningResponse:nil];
[self assert:CPData equals:[data class]];
@@ -30,10 +30,16 @@
- (void)testSynchronousRequestNotFound
{
var req = [CPURLRequest requestWithURL:@"NotFound"],
var req = [CPURLRequest requestWithURL:@"NotFound"],
data = [CPURLConnection sendSynchronousRequest:req returningResponse:nil];
[self assertNull:data];
}
@end
- (void)testRequestWithCredentials
{
var connection = [CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:@"Tests/Foundation/CPURLConnectionTest.j"] delegate:self withCredentials:YES];
[self assertTrue:[connection withCredentials]];
}
@end