diff options
Diffstat (limited to 'activerecord/test')
5 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index c86a7e0141..137fbaa73e 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -36,7 +36,7 @@ CREATE TABLE `topics` ( CREATE TABLE `developers` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) default NULL, - `salary` int(11) NULL, + `salary` int(11) default 70000, PRIMARY KEY (`id`) ); diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql index e061c214d2..4ca0e9ddc3 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.sql @@ -29,7 +29,7 @@ CREATE TABLE developers_projects ( CREATE TABLE developers ( id serial, name character varying(100), - salary integer, + salary integer DEFAULT 70000, PRIMARY KEY (id) ); SELECT setval('developers_id_seq', 100); diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql index c278651f3b..832a1a7d31 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.sql @@ -33,7 +33,7 @@ CREATE TABLE 'topics' ( CREATE TABLE 'developers' ( 'id' INTEGER PRIMARY KEY NOT NULL, 'name' TEXT DEFAULT NULL, - 'salary' INTEGER NULL + 'salary' INTEGER 70000 ); CREATE TABLE 'projects' ( diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index d5ed66c55b..0cc8899945 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -41,7 +41,7 @@ CREATE TABLE developers ( CREATE TABLE projects ( id int NOT NULL IDENTITY(1, 1), name varchar(100) default NULL, - salary int default NULL, + salary int default 70000, PRIMARY KEY (id) ); diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb index e29006983e..edd5356e23 100755 --- a/activerecord/test/validations_test.rb +++ b/activerecord/test/validations_test.rb @@ -351,7 +351,7 @@ class ValidationsTest < Test::Unit::TestCase def test_throw_away_typing d = Developer.create "name" => "David", "salary" => "100,000" assert !d.valid? - assert_not_equal "100,000", d.salary + assert_equal 100, d.salary assert_equal "100,000", d.salary_before_type_cast end end
\ No newline at end of file |