@@ -28,7 +28,7 | |||||
28 | {:params => request.query_parameters.merge(:from => @date_to - @days - 1)}, |
|
28 | {:params => request.query_parameters.merge(:from => @date_to - @days - 1)}, | |
29 | :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)), |
|
29 | :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)), | |
30 | :accesskey => accesskey(:previous)) %> |
|
30 | :accesskey => accesskey(:previous)) %> | |
31 |
</li><% unless @date_to > |
|
31 | </li><% unless @date_to > User.current.today %><li class="next page"> | |
32 | <%= link_to(l(:label_next) + " \xc2\xbb", |
|
32 | <%= link_to(l(:label_next) + " \xc2\xbb", | |
33 | {:params => request.query_parameters.merge(:from => @date_to + @days - 1)}, |
|
33 | {:params => request.query_parameters.merge(:from => @date_to + @days - 1)}, | |
34 | :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1)), |
|
34 | :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1)), |
@@ -169,4 +169,22 class ActivitiesControllerTest < Redmine::ControllerTest | |||||
169 | assert_select 'input[name=show_news][checked=checked]' |
|
169 | assert_select 'input[name=show_news][checked=checked]' | |
170 | end |
|
170 | end | |
171 | end |
|
171 | end | |
|
172 | ||||
|
173 | def test_index_should_not_show_next_page_link | |||
|
174 | @request.session[:user_id] = 2 | |||
|
175 | ||||
|
176 | get :index | |||
|
177 | assert_response :success | |||
|
178 | assert_select '.pagination a', :text => /Previous/ | |||
|
179 | assert_select '.pagination a', :text => /Next/, :count => 0 | |||
|
180 | end | |||
|
181 | ||||
|
182 | def test_index_up_to_yesterday_should_show_next_page_link | |||
|
183 | @request.session[:user_id] = 2 | |||
|
184 | ||||
|
185 | get :index, :from => (User.find(2).today-1) | |||
|
186 | assert_response :success | |||
|
187 | assert_select '.pagination a', :text => /Previous/ | |||
|
188 | assert_select '.pagination a', :text => /Next/ | |||
|
189 | end | |||
172 | end |
|
190 | end |
General Comments 0
You need to be logged in to leave comments.
Login now