aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-19 11:41:34 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-19 11:41:34 +0000
commit87b0d72fe6f97a6364a67228fdcd3a6e3a40f602 (patch)
tree2dd592b908d2a85c6321622538dbc0177d826f56 /activerecord/test
parent7b5ed66122873eebb773a6418f3a94d946cc4f8c (diff)
downloadrails-87b0d72fe6f97a6364a67228fdcd3a6e3a40f602.tar.gz
rails-87b0d72fe6f97a6364a67228fdcd3a6e3a40f602.tar.bz2
rails-87b0d72fe6f97a6364a67228fdcd3a6e3a40f602.zip
Added Developer#salary for the type tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/fixtures/db_definitions/mysql.sql1
-rw-r--r--activerecord/test/fixtures/db_definitions/postgresql.sql1
-rw-r--r--activerecord/test/fixtures/db_definitions/sqlite.sql3
-rw-r--r--activerecord/test/fixtures/db_definitions/sqlserver.sql1
-rwxr-xr-xactiverecord/test/validations_test.rb1
5 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql
index 6af00eb7f0..c86a7e0141 100755
--- a/activerecord/test/fixtures/db_definitions/mysql.sql
+++ b/activerecord/test/fixtures/db_definitions/mysql.sql
@@ -36,6 +36,7 @@ CREATE TABLE `topics` (
CREATE TABLE `developers` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(100) default NULL,
+ `salary` int(11) NULL,
PRIMARY KEY (`id`)
);
diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql
index e79a8cf023..e061c214d2 100644
--- a/activerecord/test/fixtures/db_definitions/postgresql.sql
+++ b/activerecord/test/fixtures/db_definitions/postgresql.sql
@@ -29,6 +29,7 @@ CREATE TABLE developers_projects (
CREATE TABLE developers (
id serial,
name character varying(100),
+ salary integer,
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 9863fc779f..c278651f3b 100644
--- a/activerecord/test/fixtures/db_definitions/sqlite.sql
+++ b/activerecord/test/fixtures/db_definitions/sqlite.sql
@@ -32,7 +32,8 @@ CREATE TABLE 'topics' (
CREATE TABLE 'developers' (
'id' INTEGER PRIMARY KEY NOT NULL,
- 'name' TEXT DEFAULT NULL
+ 'name' TEXT DEFAULT NULL,
+ 'salary' INTEGER NULL
);
CREATE TABLE 'projects' (
diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql
index 555ff00f90..d5ed66c55b 100644
--- a/activerecord/test/fixtures/db_definitions/sqlserver.sql
+++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql
@@ -41,6 +41,7 @@ CREATE TABLE developers (
CREATE TABLE projects (
id int NOT NULL IDENTITY(1, 1),
name varchar(100) default NULL,
+ salary int default NULL,
PRIMARY KEY (id)
);
diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb
index 8949206706..e29006983e 100755
--- a/activerecord/test/validations_test.rb
+++ b/activerecord/test/validations_test.rb
@@ -348,7 +348,6 @@ class ValidationsTest < Test::Unit::TestCase
assert_equal "hoo 5", t.errors["title"]
end
-
def test_throw_away_typing
d = Developer.create "name" => "David", "salary" => "100,000"
assert !d.valid?