@@ -52,10 +52,13 class Journal < ActiveRecord::Base | |||||
52 |
|
52 | |||
53 | def initialize(*args) |
|
53 | def initialize(*args) | |
54 | super |
|
54 | super | |
55 | if journalized && journalized.new_record? |
|
55 | if journalized | |
56 | self.notify = false |
|
56 | if journalized.new_record? | |
|
57 | self.notify = false | |||
|
58 | else | |||
|
59 | start | |||
|
60 | end | |||
57 | end |
|
61 | end | |
58 | start |
|
|||
59 | end |
|
62 | end | |
60 |
|
63 | |||
61 | def save(*args) |
|
64 | def save(*args) |
@@ -1799,7 +1799,8 class IssuesControllerTest < ActionController::TestCase | |||||
1799 | def test_post_create |
|
1799 | def test_post_create | |
1800 | @request.session[:user_id] = 2 |
|
1800 | @request.session[:user_id] = 2 | |
1801 | assert_difference 'Issue.count' do |
|
1801 | assert_difference 'Issue.count' do | |
1802 | post :create, :project_id => 1, |
|
1802 | assert_no_difference 'Journal.count' do | |
|
1803 | post :create, :project_id => 1, | |||
1803 | :issue => {:tracker_id => 3, |
|
1804 | :issue => {:tracker_id => 3, | |
1804 | :status_id => 2, |
|
1805 | :status_id => 2, | |
1805 | :subject => 'This is the test_new issue', |
|
1806 | :subject => 'This is the test_new issue', | |
@@ -1808,6 +1809,7 class IssuesControllerTest < ActionController::TestCase | |||||
1808 | :start_date => '2010-11-07', |
|
1809 | :start_date => '2010-11-07', | |
1809 | :estimated_hours => '', |
|
1810 | :estimated_hours => '', | |
1810 | :custom_field_values => {'2' => 'Value for field 2'}} |
|
1811 | :custom_field_values => {'2' => 'Value for field 2'}} | |
|
1812 | end | |||
1811 | end |
|
1813 | end | |
1812 | assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id |
|
1814 | assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id | |
1813 |
|
1815 |
General Comments 0
You need to be logged in to leave comments.
Login now