aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/QueryKit/Tests/QKUpdateQueryTests.m')
-rw-r--r--Frameworks/QueryKit/Tests/QKUpdateQueryTests.m10
1 files changed, 6 insertions, 4 deletions
diff --git a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m
index 6a24881d..65c31dae 100644
--- a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m
+++ b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m
@@ -65,25 +65,27 @@
- (void)testUpdateQueryFieldsWithoutQuotesAreCorrect
{
- [_query setUseQuotes:NO];
+ [_query setUseQuotedIdentifiers:NO];
NSString *query = [NSString stringWithFormat:@"UPDATE %@ SET %@ = '%@', %@ = '%@'", QKTestTableName, QKTestFieldOne, QKTestUpdateValueOne, QKTestFieldTwo, QKTestUpdateValueTwo];
+ NSLog(@"%@", [_query query]);
+
STAssertTrue([[_query query] hasPrefix:query], @"update query fields without quotes");
}
- (void)testUpdateQueryConstraintIsCorrect
{
- NSString *query = [NSString stringWithFormat:@"WHERE `%@` %@ %@", QKTestFieldOne, [QKQueryUtilities operatorRepresentationForType:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]];
+ NSString *query = [NSString stringWithFormat:@"WHERE `%@` %@ %@", QKTestFieldOne, [QKQueryUtilities stringRepresentationOfQueryOperator:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]];
STAssertTrue(([[_query query] rangeOfString:query].location != NSNotFound), @"update query constraint");
}
- (void)testUpdateQueryConstraintWithoutQuotesIsCorrect
{
- [_query setUseQuotes:NO];
+ [_query setUseQuotedIdentifiers:NO];
- NSString *query = [NSString stringWithFormat:@"WHERE %@ %@ %@", QKTestFieldOne, [QKQueryUtilities operatorRepresentationForType:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]];
+ NSString *query = [NSString stringWithFormat:@"WHERE %@ %@ %@", QKTestFieldOne, [QKQueryUtilities stringRepresentationOfQueryOperator:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]];
STAssertTrue(([[_query query] rangeOfString:query].location != NSNotFound), @"update query constraint without quotes");
}