@@ -136,6 +136,14 class ActivitiesControllerTest < ActionController::TestCase | |||
|
136 | 136 | end |
|
137 | 137 | end |
|
138 | 138 | |
|
139 | def test_index_atom_feed_with_user | |
|
140 | get :index, :user_id => 2, :format => 'atom' | |
|
141 | ||
|
142 | assert_response :success | |
|
143 | assert_template 'common/feed' | |
|
144 | assert_select 'title', :text => "Redmine: #{User.find(2).name}" | |
|
145 | end | |
|
146 | ||
|
139 | 147 | def test_index_should_show_private_notes_with_permission_only |
|
140 | 148 | journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Private notes with searchkeyword', :private_notes => true) |
|
141 | 149 | @request.session[:user_id] = 2 |
@@ -350,6 +350,11 class AttachmentsControllerTest < ActionController::TestCase | |||
|
350 | 350 | assert_response 404 |
|
351 | 351 | end |
|
352 | 352 | |
|
353 | def test_edit_invalid_object_should_return_404 | |
|
354 | get :edit, :object_type => 'issues', :object_id => '999' | |
|
355 | assert_response 404 | |
|
356 | end | |
|
357 | ||
|
353 | 358 | def test_edit_for_object_that_is_not_visible_should_return_403 |
|
354 | 359 | get :edit, :object_type => 'issues', :object_id => '4' |
|
355 | 360 | assert_response 403 |
@@ -250,6 +250,15 class ContextMenusControllerTest < ActionController::TestCase | |||
|
250 | 250 | assert_select 'a:not(.disabled)', :text => 'Edit' |
|
251 | 251 | end |
|
252 | 252 | |
|
253 | def test_context_menu_for_one_time_entry | |
|
254 | @request.session[:user_id] = 2 | |
|
255 | get :time_entries, :ids => [1] | |
|
256 | assert_response :success | |
|
257 | assert_template 'context_menus/time_entries' | |
|
258 | ||
|
259 | assert_select 'a:not(.disabled)', :text => 'Edit' | |
|
260 | end | |
|
261 | ||
|
253 | 262 | def test_time_entries_context_menu_should_include_custom_fields |
|
254 | 263 | field = TimeEntryCustomField.generate!(:name => "Field", :field_format => "list", :possible_values => ["foo", "bar"]) |
|
255 | 264 |
General Comments 0
You need to be logged in to leave comments.
Login now