mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-31 14:28:49 +01:00
Fix bug in tests introduced by dd5b479c5d
This commit is contained in:
parent
c1ff335740
commit
26c94551cd
1 changed files with 13 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class TodosHelperTest < Test::Rails::HelperTestCase
|
||||
fixtures :users
|
||||
|
||||
def setup
|
||||
super
|
||||
|
|
@ -10,6 +11,18 @@ class TodosHelperTest < Test::Rails::HelperTestCase
|
|||
include ApplicationHelper
|
||||
include TodosHelper
|
||||
|
||||
def current_user
|
||||
if @user.nil?
|
||||
@user = users(:admin_user)
|
||||
class << @user
|
||||
def prefs
|
||||
Preference.new
|
||||
end
|
||||
end
|
||||
end
|
||||
@user
|
||||
end
|
||||
|
||||
def format_date(date)
|
||||
if date
|
||||
date_format = "%d/%m/%Y"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue