aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/base_test.rb8
-rw-r--r--activerecord/test/fixtures/db_definitions/sqlite.sql2
2 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index b80f4ff6ef..c2a105f85d 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -260,11 +260,15 @@ class BasicsTest < Test::Unit::TestCase
end
def test_update_all
- Topic.update_all "content = 'bulk updated!'"
+ assert_equal 2, Topic.update_all("content = 'bulk updated!'")
assert_equal "bulk updated!", Topic.find(1).content
assert_equal "bulk updated!", Topic.find(2).content
end
-
+
+ def test_delete_all
+ assert_equal 2, Topic.delete_all
+ end
+
def test_update_by_condition
Topic.update_all "content = 'bulk updated!'", "approved = 1"
assert_equal "Have a nice day", Topic.find(1).content
diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql
index 1e9aed1e1b..9bab9d9a15 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 70000
+ 'salary' INTEGER DEFAULT 70000
);
CREATE TABLE 'projects' (