Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
insure cleanup of account deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
loveridge committed Aug 19, 2015
1 parent cc2874e commit 0b32f8c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/src/occi_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,17 @@ class Statement {

void setDynamic(int index, dynamic input){
if(input is int){
setInt(index, input);
setInt(index, input);
} else if(input is double){
setDouble(index, input);
setDouble(index, input);
} else if(input is num){
setNum(index, input);
setNum(index, input);
} else if(input is String){
setString(index, input);
setString(index, input);
} else if(input is DateTime){
setTimestamp(index, input);
setTimestamp(index, input);
}else{
throw("unsupported type");
throw("unsupported type");
}
}
}
Expand Down
9 changes: 7 additions & 2 deletions test/complete_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ main() {
con.commit();
});
test('change password', (){
try{
con.execute('CREATE USER foo IDENTIFIED BY "bar"');
con.execute('GRANT CREATE SESSION to foo');
var con2 = env.createConnection('foo', 'bar', connString);
Expand All @@ -47,7 +48,11 @@ main() {
returnsNormally);

con2.terminate();
con.execute('DROP USER foo');
} catch(e){
expect("", equals("FAILURE IN CHANGEPASSWORD TEST"));
} finally{
con.execute('DROP USER foo');
}
});
test('get connection properties', (){
expect(con.getConnectionString(), equals(connString));
Expand Down Expand Up @@ -265,7 +270,7 @@ main() {
results.next(1);
expect(results.getNum(1), equals(10));
expect(results.getString(2), equals("hello"));
expect(results.getDate(3).toString(), equals(new DateTime(2000, 11, 11, 31, 31, 31).toString()));
expect(results.getDate(3), equals(new DateTime(2000, 11, 11, 31, 31, 31)));
});
test('test get', (){
var stmt = con.createStatement("SELECT * FROM test_table");
Expand Down

0 comments on commit 0b32f8c

Please sign in to comment.