summaryrefslogtreecommitdiffstats
path: root/test/functional/journals_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-05 08:08:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-05 08:08:00 +0000
commita942c1c25ec955bfefd6ebcd9993f1d7ac1faf1e (patch)
treee1eb628af6998d3f8016636598590511cf55010b /test/functional/journals_controller_test.rb
parent7673910a2d9f90ddc27eb2be48bb2e46eda59450 (diff)
downloadredmine-a942c1c25ec955bfefd6ebcd9993f1d7ac1faf1e.tar.gz
redmine-a942c1c25ec955bfefd6ebcd9993f1d7ac1faf1e.zip
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
Diffstat (limited to 'test/functional/journals_controller_test.rb')
-rw-r--r--test/functional/journals_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/journals_controller_test.rb b/test/functional/journals_controller_test.rb
index d281be5a4..a05246023 100644
--- a/test/functional/journals_controller_test.rb
+++ b/test/functional/journals_controller_test.rb
@@ -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