Fixed test that broke in late hours of the evening. Also, fixed syntax to suppress warning from open_id_consumer plugin.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@626 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-11-04 04:55:21 +00:00
parent 6bec8101af
commit 06d94b1f1c
3 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ class User < ActiveRecord::Base
:conditions => [ 'state = ?', 'deferred' ],
:order => 'show_from ASC, todos.created_at DESC' do
def find_and_activate_ready
find(:all, :conditions => ['show_from <= ?', Time.now.beginning_of_day ]).collect { |t| t.activate_and_save! }
find(:all, :conditions => ['show_from <= ?', proxy_owner.time ]).collect { |t| t.activate_and_save! }
end
end
has_many :completed_todos,

View file

@ -235,7 +235,7 @@ class UserTest < Test::Rails::TestCase
def test_find_and_activate_deferred_todos_that_are_ready
assert_equal 1, @admin_user.deferred_todos.count
@admin_user.deferred_todos[0].show_from = Time.now.utc.to_date
@admin_user.deferred_todos[0].show_from = @admin_user.time.to_date
@admin_user.deferred_todos[0].save
@admin_user.deferred_todos.reload
@admin_user.deferred_todos.find_and_activate_ready

View file

@ -16,7 +16,7 @@
# under the License.
begin
require_gem "ruby-openid", ">= 1.0"
gem "ruby-openid", ">= 1.0"
rescue LoadError
require "openid"
end