Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed assertions to be more flexible with property order

  • Loading branch information...
commit 0a2ccd1f36da7b97260cc2f55f74e37b2fbc1437 1 parent 79e3e8f
@newyankeecodeshop authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 Tests/TObjectCategories.m
View
5 Tests/TObjectCategories.m
@@ -42,8 +42,9 @@ - (void)testObjectEncoding
test.dateProp = [[NSDate date] dateByAddingTimeInterval:60 * 60 * 24];
NSString* jsText = [test stringForJavaScript];
- GHAssertTrue([jsText hasPrefix:@"{ dateProp:new Date("], @"Date property not serialized");
- GHAssertTrue([jsText hasSuffix:@"intProp:1024, stringProp:'Hello World'}"], @"Other props not serialized");
+ GHAssertTrue([jsText rangeOfString:@" dateProp:new Date("].location != NSNotFound, @"Date property not serialized");
+ GHAssertTrue([jsText rangeOfString:@" intProp:1024"].location != NSNotFound, @"Int property not serialized");
+ GHAssertTrue([jsText rangeOfString:@" stringProp:'Hello World'"].location != NSNotFound, @"String property not serialized");
[test release];
}
Please sign in to comment.
Something went wrong with that request. Please try again.