class DefaultsUsingMultipleSchemasAndDomainTest
Public Instance Methods
test_bpchar_defaults_in_new_schema_when_overriding_domain()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/schema_test.rb, line 540 def test_bpchar_defaults_in_new_schema_when_overriding_domain @connection.execute "ALTER TABLE defaults ADD bpchar_col bpchar DEFAULT 'some value'" Default.reset_column_information assert_equal "some value", Default.new.bpchar_col, "Default of bpchar column was not correctly parsed" end
test_decimal_defaults_in_new_schema_when_overriding_domain()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/schema_test.rb, line 536 def test_decimal_defaults_in_new_schema_when_overriding_domain assert_equal BigDecimal.new("3.14159265358979323846"), Default.new.decimal_col, "Default of decimal column was not correctly parsed" end
test_default_containing_quote_and_colons()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/schema_test.rb, line 551 def test_default_containing_quote_and_colons @connection.execute "ALTER TABLE defaults ALTER COLUMN string_col SET DEFAULT 'foo''::bar'" assert_equal "foo'::bar", Default.new.string_col end
test_string_defaults_in_new_schema_when_overriding_domain()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/schema_test.rb, line 532 def test_string_defaults_in_new_schema_when_overriding_domain assert_equal "some value", Default.new.string_col, "Default of string column was not correctly parsed" end
test_text_defaults_after_updating_column_default()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/schema_test.rb, line 546 def test_text_defaults_after_updating_column_default @connection.execute "ALTER TABLE defaults ALTER COLUMN text_col SET DEFAULT 'some text'::schema_1.text" assert_equal "some text", Default.new.text_col, "Default of text column was not correctly parsed after updating default using '::text' since postgreSQL will add parens to the default in db" end
test_text_defaults_in_new_schema_when_overriding_domain()
click to toggle source
# File activerecord/test/cases/adapters/postgresql/schema_test.rb, line 528 def test_text_defaults_in_new_schema_when_overriding_domain assert_equal "some value", Default.new.text_col, "Default of text column was not correctly parsed" end