@@ -84,10 +84,7 class JournalsController < ApplicationController | |||||
84 | end |
|
84 | end | |
85 | else |
|
85 | else | |
86 | respond_to do |format| |
|
86 | respond_to do |format| | |
87 | format.html { |
|
87 | # TODO: implement non-JS journal update | |
88 | # TODO: implement non-JS journal update |
|
|||
89 | render :nothing => true |
|
|||
90 | } |
|
|||
91 | format.js |
|
88 | format.js | |
92 | end |
|
89 | end | |
93 | end |
|
90 | end |
@@ -32,6 +32,11 class JournalsControllerTest < ActionController::TestCase | |||||
32 | assert_equal 'application/atom+xml', @response.content_type |
|
32 | assert_equal 'application/atom+xml', @response.content_type | |
33 | end |
|
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 | def test_index_should_return_privates_notes_with_permission_only |
|
40 | def test_index_should_return_privates_notes_with_permission_only | |
36 | journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1) |
|
41 | journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1) | |
37 | @request.session[:user_id] = 2 |
|
42 | @request.session[:user_id] = 2 | |
@@ -55,6 +60,15 class JournalsControllerTest < ActionController::TestCase | |||||
55 | assert_select 'span.diff_in', :text => /added/ |
|
60 | assert_select 'span.diff_in', :text => /added/ | |
56 | end |
|
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 | def test_reply_to_issue |
|
72 | def test_reply_to_issue | |
59 | @request.session[:user_id] = 2 |
|
73 | @request.session[:user_id] = 2 | |
60 | xhr :get, :new, :id => 6 |
|
74 | xhr :get, :new, :id => 6 |
General Comments 0
You need to be logged in to leave comments.
Login now