aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseAction.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-03-16 21:48:15 +0100
committerMax <post@wickenrode.com>2015-03-16 21:48:15 +0100
commit0dc8d023f39c1bd03f51e62d90b6be7693955e53 (patch)
tree1c4255031077e501ecb46a019820ac125010a5db /Source/SPDatabaseAction.m
parentf86e21e8296a5c368fb547b93ff0390dec0f5785 (diff)
downloadsequelpro-0dc8d023f39c1bd03f51e62d90b6be7693955e53.tar.gz
sequelpro-0dc8d023f39c1bd03f51e62d90b6be7693955e53.tar.bz2
sequelpro-0dc8d023f39c1bd03f51e62d90b6be7693955e53.zip
Updated OCMock framework and added a unit test
Diffstat (limited to 'Source/SPDatabaseAction.m')
-rw-r--r--Source/SPDatabaseAction.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPDatabaseAction.m b/Source/SPDatabaseAction.m
index c7f5dbf9..413e2378 100644
--- a/Source/SPDatabaseAction.m
+++ b/Source/SPDatabaseAction.m
@@ -65,7 +65,10 @@
- (BOOL)createDatabase:(NSString *)database withEncoding:(NSString *)encoding collation:(NSString *)collation
{
- NSParameterAssert(database != nil && [database length] > 0);
+ if(![database length]) {
+ SPLog(@"'database' should not be nil or empty!");
+ return NO;
+ }
NSMutableString *query = [NSMutableString stringWithFormat:@"CREATE DATABASE %@", [database backtickQuotedString]];