From 80b05852e74046b479ced200c53e966c2f35091b Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 3 Mar 2011 16:11:34 -0800 Subject: [PATCH] Fix tests by forcing ints from select_all --- test/unit/rate_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/rate_test.rb b/test/unit/rate_test.rb index 99a585e..19ae3ec 100644 --- a/test/unit/rate_test.rb +++ b/test/unit/rate_test.rb @@ -284,11 +284,11 @@ class RateTest < ActiveSupport::TestCase TimeEntry.update_all('cost = null') # Check that cost is NULL in the database, which skips the caching - assert_equal "2", ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"] + assert_equal 2, ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"].to_i Rate.update_all_time_entries_with_missing_cost - assert_equal "0", ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"] + assert_equal 0, ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"].to_i end @@ -313,11 +313,11 @@ class RateTest < ActiveSupport::TestCase end should "update the caches of all Time Entries" do - assert_equal "0", ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"] + assert_equal 0, ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"].to_i Rate.update_all_time_entries_to_refresh_cache - assert_equal "0", ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"] + assert_equal 0, ActiveRecord::Base.connection.select_all('select count(*) as count from time_entries where cost IS NULL').first["count"].to_i end