@@ -133,14 +133,26 class IssuesHelperTest < ActionView::TestCase | |||
|
133 | 133 | end |
|
134 | 134 | end |
|
135 | 135 | |
|
136 | context "with a due_date attribute" do | |
|
137 | should "format the current date" do | |
|
138 | @detail = JournalDetail.new(:property => 'attr', :old_value => '2010-01-01', :value => '2010-01-31', :prop_key => 'due_date') | |
|
136 | def test_with_a_due_date_attribute_should_with_a_due_date_attribute | |
|
137 | @detail = JournalDetail.new( | |
|
138 | :property => 'attr', | |
|
139 | :old_value => '2010-01-01', | |
|
140 | :value => '2010-01-31', | |
|
141 | :prop_key => 'due_date' | |
|
142 | ) | |
|
143 | with_settings :date_format => '%m/%d/%Y' do | |
|
139 | 144 | assert_match "01/31/2010", show_detail(@detail, true) |
|
140 | 145 | end |
|
146 | end | |
|
141 | 147 | |
|
142 | should "format the old date" do | |
|
143 | @detail = JournalDetail.new(:property => 'attr', :old_value => '2010-01-01', :value => '2010-01-31', :prop_key => 'due_date') | |
|
148 | def test_with_a_due_date_attribute_should_format_the_old_date | |
|
149 | @detail = JournalDetail.new( | |
|
150 | :property => 'attr', | |
|
151 | :old_value => '2010-01-01', | |
|
152 | :value => '2010-01-31', | |
|
153 | :prop_key => 'due_date' | |
|
154 | ) | |
|
155 | with_settings :date_format => '%m/%d/%Y' do | |
|
144 | 156 | assert_match "01/01/2010", show_detail(@detail, true) |
|
145 | 157 | end |
|
146 | 158 | end |
General Comments 0
You need to be logged in to leave comments.
Login now