@@ -133,65 +133,65 class IssuesHelperTest < ActionView::TestCase | |||
|
133 | 133 | end |
|
134 | 134 | |
|
135 | 135 | should "show old and new values with a project attribute" do |
|
136 |
detail = JournalDetail. |
|
|
136 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'project_id', :old_value => 1, :value => 2) | |
|
137 | 137 | assert_match 'eCookbook', show_detail(detail, true) |
|
138 | 138 | assert_match 'OnlineStore', show_detail(detail, true) |
|
139 | 139 | end |
|
140 | 140 | |
|
141 | 141 | should "show old and new values with a issue status attribute" do |
|
142 |
detail = JournalDetail. |
|
|
142 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'status_id', :old_value => 1, :value => 2) | |
|
143 | 143 | assert_match 'New', show_detail(detail, true) |
|
144 | 144 | assert_match 'Assigned', show_detail(detail, true) |
|
145 | 145 | end |
|
146 | 146 | |
|
147 | 147 | should "show old and new values with a tracker attribute" do |
|
148 |
detail = JournalDetail. |
|
|
148 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'tracker_id', :old_value => 1, :value => 2) | |
|
149 | 149 | assert_match 'Bug', show_detail(detail, true) |
|
150 | 150 | assert_match 'Feature request', show_detail(detail, true) |
|
151 | 151 | end |
|
152 | 152 | |
|
153 | 153 | should "show old and new values with a assigned to attribute" do |
|
154 |
detail = JournalDetail. |
|
|
154 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'assigned_to_id', :old_value => 1, :value => 2) | |
|
155 | 155 | assert_match 'redMine Admin', show_detail(detail, true) |
|
156 | 156 | assert_match 'John Smith', show_detail(detail, true) |
|
157 | 157 | end |
|
158 | 158 | |
|
159 | 159 | should "show old and new values with a priority attribute" do |
|
160 |
detail = JournalDetail. |
|
|
160 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'priority_id', :old_value => 4, :value => 5) | |
|
161 | 161 | assert_match 'Low', show_detail(detail, true) |
|
162 | 162 | assert_match 'Normal', show_detail(detail, true) |
|
163 | 163 | end |
|
164 | 164 | |
|
165 | 165 | should "show old and new values with a category attribute" do |
|
166 |
detail = JournalDetail. |
|
|
166 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'category_id', :old_value => 1, :value => 2) | |
|
167 | 167 | assert_match 'Printing', show_detail(detail, true) |
|
168 | 168 | assert_match 'Recipes', show_detail(detail, true) |
|
169 | 169 | end |
|
170 | 170 | |
|
171 | 171 | should "show old and new values with a fixed version attribute" do |
|
172 |
detail = JournalDetail. |
|
|
172 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'fixed_version_id', :old_value => 1, :value => 2) | |
|
173 | 173 | assert_match '0.1', show_detail(detail, true) |
|
174 | 174 | assert_match '1.0', show_detail(detail, true) |
|
175 | 175 | end |
|
176 | 176 | |
|
177 | 177 | should "show old and new values with a estimated hours attribute" do |
|
178 |
detail = JournalDetail. |
|
|
178 | detail = JournalDetail.new(:property => 'attr', :prop_key => 'estimated_hours', :old_value => '5', :value => '6.3') | |
|
179 | 179 | assert_match '5.00', show_detail(detail, true) |
|
180 | 180 | assert_match '6.30', show_detail(detail, true) |
|
181 | 181 | end |
|
182 | 182 | |
|
183 | 183 | should "show old and new values with a custom field" do |
|
184 |
detail = JournalDetail. |
|
|
184 | detail = JournalDetail.new(:property => 'cf', :prop_key => '1', :old_value => 'MySQL', :value => 'PostgreSQL') | |
|
185 | 185 | assert_equal 'Database changed from MySQL to PostgreSQL', show_detail(detail, true) |
|
186 | 186 | end |
|
187 | 187 | |
|
188 | 188 | should "show added file" do |
|
189 |
detail = JournalDetail. |
|
|
189 | detail = JournalDetail.new(:property => 'attachment', :prop_key => '1', :old_value => nil, :value => 'error281.txt') | |
|
190 | 190 | assert_match 'error281.txt', show_detail(detail, true) |
|
191 | 191 | end |
|
192 | 192 | |
|
193 | 193 | should "show removed file" do |
|
194 |
detail = JournalDetail. |
|
|
194 | detail = JournalDetail.new(:property => 'attachment', :prop_key => '1', :old_value => 'error281.txt', :value => nil) | |
|
195 | 195 | assert_match 'error281.txt', show_detail(detail, true) |
|
196 | 196 | end |
|
197 | 197 | end |
General Comments 0
You need to be logged in to leave comments.
Login now