Skip to content

Commit

Permalink
Add test for defaults from Daniel Rodríguez Troitiño
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Holland committed May 19, 2008
1 parent 1d3ae72 commit 5df129b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/tc_integration.rb
Expand Up @@ -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
Expand Down

0 comments on commit 5df129b

Please sign in to comment.