Feature #2471 » fix_test.patch
test/functional/my_controller_test.rb | ||
---|---|---|
202 | 202 |
user = User.find(2) |
203 | 203 |
user.pref.my_page_layout = {'top' => ['activity']} |
204 | 204 |
user.pref.save! |
205 |
events_by_day = Redmine::Activity::Fetcher.new(user, :author => user).events(nil, nil, :limit => 10).group_by(&:event_date) |
|
205 | 206 | |
206 | 207 |
get :page |
207 | 208 |
assert_response :success |
208 | 209 | |
209 | 210 |
assert_select 'div#block-activity' do |
210 | 211 |
assert_select 'h3' do |
211 |
assert_select 'a[href=?]', activity_path(from: Date.today, user_id: user.id), :text => 'Activity'
|
|
212 |
assert_select 'a[href=?]', activity_path(from: events_by_day.keys.first, user_id: user.id), :text => 'Activity'
|
|
212 | 213 |
end |
213 | 214 |
assert_select 'div#activity' do |
214 | 215 |
assert_select 'dt', 10 |