mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-06 12:50:19 +01:00
Remove the fake preferences object
It's no longer needed since we're not using the preferences in this object anymore.
This commit is contained in:
parent
43275e064e
commit
809154332f
1 changed files with 2 additions and 7 deletions
|
|
@ -3,8 +3,7 @@ require_relative '../../lib/staleness'
|
||||||
|
|
||||||
|
|
||||||
class StalenessTest < Test::Unit::TestCase
|
class StalenessTest < Test::Unit::TestCase
|
||||||
FakeUser = Struct.new(:time, :prefs)
|
FakeUser = Struct.new(:time)
|
||||||
FakePrefs = Struct.new(:staleness_starts)
|
|
||||||
FakeTask = Struct.new(:due, :completed, :created_at) do
|
FakeTask = Struct.new(:due, :completed, :created_at) do
|
||||||
def completed?
|
def completed?
|
||||||
self.completed
|
self.completed
|
||||||
|
|
@ -31,12 +30,8 @@ class StalenessTest < Test::Unit::TestCase
|
||||||
@day8 ||= Time.utc(2013, 2, 20, 0, 0, 0)
|
@day8 ||= Time.utc(2013, 2, 20, 0, 0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
def fake_prefs
|
|
||||||
@fake_prefs ||= FakePrefs.new(7)
|
|
||||||
end
|
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@current_user = FakeUser.new(now, fake_prefs)
|
@current_user = FakeUser.new(now)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_item_with_due_date_is_not_stale_ever
|
def test_item_with_due_date_is_not_stale_ever
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue