mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
Removed unimplemented JournalsController#edit html response and added some tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13704 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -84,10 +84,7 @@ class JournalsController < ApplicationController
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
# TODO: implement non-JS journal update
|
||||
render :nothing => true
|
||||
}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,6 +32,11 @@ class JournalsControllerTest < ActionController::TestCase
|
||||
assert_equal 'application/atom+xml', @response.content_type
|
||||
end
|
||||
|
||||
def test_index_with_invalid_query_id
|
||||
get :index, :project_id => 1, :query_id => 999
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
def test_index_should_return_privates_notes_with_permission_only
|
||||
journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1)
|
||||
@request.session[:user_id] = 2
|
||||
@@ -55,6 +60,15 @@ class JournalsControllerTest < ActionController::TestCase
|
||||
assert_select 'span.diff_in', :text => /added/
|
||||
end
|
||||
|
||||
def test_diff_should_default_to_description_diff
|
||||
get :diff, :id => 3
|
||||
assert_response :success
|
||||
assert_template 'diff'
|
||||
|
||||
assert_select 'span.diff_out', :text => /removed/
|
||||
assert_select 'span.diff_in', :text => /added/
|
||||
end
|
||||
|
||||
def test_reply_to_issue
|
||||
@request.session[:user_id] = 2
|
||||
xhr :get, :new, :id => 6
|
||||
|
||||
Reference in New Issue
Block a user