mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Added Developer#salary for the type tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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 @@ 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?
|
||||
|
||||
Reference in New Issue
Block a user