diff options
author | Rob Holland <rob@inversepath.com> | 2008-05-19 20:27:38 +0100 |
---|---|---|
committer | Rob Holland <rob@inversepath.com> | 2008-05-19 20:27:38 +0100 |
commit | 5df129b18892d720752e84d547cf339e29bcf8ea (patch) | |
tree | 62270dc12b16f32ba5d371faa8c4ced71853c2d7 | |
parent | 1d3ae7236772fcb39d1f28957fad3c277a6bb34c (diff) | |
download | third_party-sqlite3-ruby-5df129b18892d720752e84d547cf339e29bcf8ea.tar.gz third_party-sqlite3-ruby-5df129b18892d720752e84d547cf339e29bcf8ea.tar.xz third_party-sqlite3-ruby-5df129b18892d720752e84d547cf339e29bcf8ea.zip |
Add test for defaults from Daniel RodrÃguez Troitiño
-rw-r--r-- | test/tc_integration.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/tc_integration.rb b/test/tc_integration.rb index e9d9054..515c711 100644 --- a/test/tc_integration.rb +++ b/test/tc_integration.rb @@ -94,6 +94,17 @@ module Integration end end + define_method( "test_table_info_without_defaults_for_version_3_3_8_and_higher" ) do + @db.transaction do + @db.execute "create table no_defaults_test ( a integer default 1, b integer )" + data = @db.table_info( "no_defaults_test" ) + assert_equal({"name" => "a", "type" => "integer", "dflt_value" => "1", "notnull" => "0", "cid" => "0", "pk" => "0"}, + data[0]) + assert_equal({"name" => "b", "type" => "integer", "dflt_value" => nil, "notnull" => "0", "cid" => "1", "pk" => "0"}, + data[1]) + end + end + define_method( "test_complete_fail" ) do assert !@db.complete?( "select * from foo" ) end |