Permalink
Browse files

Added Developer#salary for the type tests

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7b5ed66 commit 87b0d72fe6f97a6364a67228fdcd3a6e3a40f602 @dhh dhh committed Dec 19, 2004
@@ -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`)
);
@@ -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);
@@ -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' (
@@ -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)
);
@@ -348,7 +348,6 @@ def test_validates_length_of_custom_errors_for_is_with_wrong_length
assert_equal "hoo 5", t.errors["title"]
end
-
def test_throw_away_typing
d = Developer.create "name" => "David", "salary" => "100,000"
assert !d.valid?

0 comments on commit 87b0d72

Please sign in to comment.