Permalink
Browse files

iPhone tests now working

Moved all SenTestCases to GHTestCases
  • Loading branch information...
1 parent 4338d8f commit 931176eb61407e472a23d963c53418483a7ce68f @pokeb committed Feb 27, 2009
@@ -6,9 +6,9 @@
// Copyright 2008 All-Seeing Interactive. All rights reserved.
//
-#import <SenTestingKit/SenTestingKit.h>
+#import "GHUnit.h"
-@interface ASIFormDataRequestTests : SenTestCase {
+@interface ASIFormDataRequestTests : GHTestCase {
float progress;
}
@@ -25,15 +25,15 @@ - (void)testPostWithFileUpload
ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
NSDate *d = [NSDate new];
- NSValue *v = [NSValue valueWithRect:NSMakeRect(0, 0, 200, 200)];
+ NSValue *v = [NSValue valueWithCGRect:CGRectMake(0, 0, 200, 200)];
[request setPostValue:@"foo" forKey:@"post_var"];
[request setPostValue:d forKey:@"post_var2"];
[request setPostValue:v forKey:@"post_var3"];
[request setFile:path forKey:@"file"];
[request start];
BOOL success = ([[request responseString] isEqualToString:[NSString stringWithFormat:@"post_var: %@\r\npost_var2: %@\r\npost_var3: %@\r\nfile_name: %@\r\nfile_size: %hu",@"foo",d,v,@"bigfile",size]]);
- STAssertTrue(success,@"Failed to upload the correct data (using local file)");
+ GHAssertTrue(success,@"Failed to upload the correct data (using local file)");
//Try the same with the raw data
request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
@@ -44,7 +44,7 @@ - (void)testPostWithFileUpload
[request start];
success = ([[request responseString] isEqualToString:[NSString stringWithFormat:@"post_var: %@\r\npost_var2: %@\r\npost_var3: %@\r\nfile_name: %@\r\nfile_size: %hu",@"foo",d,v,@"file",size]]);
- STAssertTrue(success,@"Failed to upload the correct data (using NSData)");
+ GHAssertTrue(success,@"Failed to upload the correct data (using NSData)");
}
View
@@ -6,10 +6,9 @@
// Copyright 2008 All-Seeing Interactive. All rights reserved.
//
-#import <SenTestingKit/SenTestingKit.h>
+#import "GHUnit.h"
-
-@interface ASIHTTPRequestTests : SenTestCase {
+@interface ASIHTTPRequestTests : GHTestCase {
float progress;
}
Oops, something went wrong.

0 comments on commit 931176e

Please sign in to comment.