aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-07-12 01:42:22 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-07-12 01:43:37 +0900
commitb10b7917e6449343e55958d1176d36d7ad04a46e (patch)
treeba114bfbea7488c195cb9f1b400f6319b963b7ee /activerecord/test/cases/calculations_test.rb
parent968b59af872efe4fd562bea377765967dadea958 (diff)
downloadrails-b10b7917e6449343e55958d1176d36d7ad04a46e.tar.gz
rails-b10b7917e6449343e55958d1176d36d7ad04a46e.tar.bz2
rails-b10b7917e6449343e55958d1176d36d7ad04a46e.zip
Fix Active Record test failure
Caused at a45363a2fb53e0a016f33dd211c00b5d81764379.
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-rw-r--r--activerecord/test/cases/calculations_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 06c2f10dc6..6acfec0621 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -26,7 +26,7 @@ class NumericData < ActiveRecord::Base
end
class CalculationsTest < ActiveRecord::TestCase
- fixtures :companies, :accounts, :topics, :speedometers, :minivans
+ fixtures :companies, :accounts, :topics, :speedometers, :minivans, :books
def test_should_sum_field
assert_equal 318, Account.sum(:credit_limit)
@@ -796,7 +796,6 @@ class CalculationsTest < ActiveRecord::TestCase
end
def test_group_by_attribute_with_custom_type
- Book.create!(status: :published)
- assert_equal({ "published" => 1 }, Book.group(:status).count)
+ assert_equal({ "proposed" => 2, "published" => 2 }, Book.group(:status).count)
end
end