aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-07-14 10:26:44 +0000
committerstuconnolly <stuart02@gmail.com>2012-07-14 10:26:44 +0000
commit6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c (patch)
treea2b9c82ab3db6f149ee6a67affd94ecda30a5b9b /Frameworks/QueryKit/Tests/QKUpdateQueryTests.m
parenta2d65d3fa1e58d91d47260cdbbbeae7c99aa04f8 (diff)
downloadsequelpro-6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c.tar.gz
sequelpro-6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c.tar.bz2
sequelpro-6c1a1acdb2e030b08ccd08dc6eea70b3657ebb4c.zip
Bunch of improvements including uderlying database system support.
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");
}