@@ -84,10 +84,7 class JournalsController < ApplicationController | |||
|
84 | 84 | end |
|
85 | 85 | else |
|
86 | 86 | respond_to do |format| |
|
87 | format.html { | |
|
88 | 87 |
|
|
89 | render :nothing => true | |
|
90 | } | |
|
91 | 88 | format.js |
|
92 | 89 | end |
|
93 | 90 | end |
@@ -32,6 +32,11 class JournalsControllerTest < ActionController::TestCase | |||
|
32 | 32 | assert_equal 'application/atom+xml', @response.content_type |
|
33 | 33 | end |
|
34 | 34 | |
|
35 | def test_index_with_invalid_query_id | |
|
36 | get :index, :project_id => 1, :query_id => 999 | |
|
37 | assert_response 404 | |
|
38 | end | |
|
39 | ||
|
35 | 40 | def test_index_should_return_privates_notes_with_permission_only |
|
36 | 41 | journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1) |
|
37 | 42 | @request.session[:user_id] = 2 |
@@ -55,6 +60,15 class JournalsControllerTest < ActionController::TestCase | |||
|
55 | 60 | assert_select 'span.diff_in', :text => /added/ |
|
56 | 61 | end |
|
57 | 62 | |
|
63 | def test_diff_should_default_to_description_diff | |
|
64 | get :diff, :id => 3 | |
|
65 | assert_response :success | |
|
66 | assert_template 'diff' | |
|
67 | ||
|
68 | assert_select 'span.diff_out', :text => /removed/ | |
|
69 | assert_select 'span.diff_in', :text => /added/ | |
|
70 | end | |
|
71 | ||
|
58 | 72 | def test_reply_to_issue |
|
59 | 73 | @request.session[:user_id] = 2 |
|
60 | 74 | xhr :get, :new, :id => 6 |
General Comments 0
You need to be logged in to leave comments.
Login now