mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
24 lines
621 B
Plaintext
24 lines
621 B
Plaintext
|
|
@implementation CPURLConnectionTest : OJTestCase
|
|
{
|
|
}
|
|
|
|
- (void)testSynchronousRequestSuccess
|
|
{
|
|
var req = [CPURLRequest requestWithURL:@"Tests/Foundation/CPURLConnectionTest.j"],
|
|
data = [CPURLConnection sendSynchronousRequest:req returningResponse:nil];
|
|
|
|
[self assert:CPData equals:[data class]];
|
|
[self assertNotNull:data];
|
|
[self assertFalse:([data rawString] == @"")];
|
|
}
|
|
|
|
- (void)testSynchronousRequestNotFound
|
|
{
|
|
var req = [CPURLRequest requestWithURL:@"NotFound"],
|
|
data = [CPURLConnection sendSynchronousRequest:req returningResponse:nil];
|
|
|
|
[self assertNull:data];
|
|
}
|
|
|
|
@end |