##// END OF EJS Templates
replace shoulder "with a start_date attribute" context of test/unit/helpers/issues_helper_test.rb...
Toshi MARUYAMA -
r10070:444987ce91a0
parent child
Show More
@@ -109,16 +109,24 class IssuesHelperTest < ActionView::TestCase
109 end
109 end
110 end
110 end
111
111
112 context "with a start_date attribute" do
112 def test_with_a_start_date_attribute_format_the_current_date
113 should "format the current date" do
113 @detail = JournalDetail.new(
114 @detail = JournalDetail.new(:property => 'attr', :old_value => '2010-01-01', :value => '2010-01-31', :prop_key => 'start_date')
114 :property => 'attr',
115 assert_match "01/31/2010", show_detail(@detail, true)
115 :old_value => '2010-01-01',
116 end
116 :value => '2010-01-31',
117 :prop_key => 'start_date'
118 )
119 assert_match "01/31/2010", show_detail(@detail, true)
120 end
117
121
118 should "format the old date" do
122 def test_with_a_start_date_attribute_format_the_old_date
119 @detail = JournalDetail.new(:property => 'attr', :old_value => '2010-01-01', :value => '2010-01-31', :prop_key => 'start_date')
123 @detail = JournalDetail.new(
120 assert_match "01/01/2010", show_detail(@detail, true)
124 :property => 'attr',
121 end
125 :old_value => '2010-01-01',
126 :value => '2010-01-31',
127 :prop_key => 'start_date'
128 )
129 assert_match "01/01/2010", show_detail(@detail, true)
122 end
130 end
123
131
124 context "with a due_date attribute" do
132 context "with a due_date attribute" do
General Comments 0
You need to be logged in to leave comments. Login now