@@ -52,11 +52,14 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 | if journalized.new_record? | |||
56 | self.notify = false |
|
57 | self.notify = false | |
57 | end |
|
58 | else | |
58 | start |
|
59 | start | |
59 | end |
|
60 | end | |
|
61 | end | |||
|
62 | end | |||
60 |
|
63 | |||
61 | def save(*args) |
|
64 | def save(*args) | |
62 | journalize_changes |
|
65 | journalize_changes |
@@ -1799,6 +1799,7 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 | assert_no_difference 'Journal.count' do | |||
1802 | post :create, :project_id => 1, |
|
1803 | post :create, :project_id => 1, | |
1803 | :issue => {:tracker_id => 3, |
|
1804 | :issue => {:tracker_id => 3, | |
1804 | :status_id => 2, |
|
1805 | :status_id => 2, | |
@@ -1809,6 +1810,7 class IssuesControllerTest < ActionController::TestCase | |||||
1809 | :estimated_hours => '', |
|
1810 | :estimated_hours => '', | |
1810 | :custom_field_values => {'2' => 'Value for field 2'}} |
|
1811 | :custom_field_values => {'2' => 'Value for field 2'}} | |
1811 | end |
|
1812 | 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 | |||
1814 | issue = Issue.find_by_subject('This is the test_new issue') |
|
1816 | issue = Issue.find_by_subject('This is the test_new issue') |
General Comments 0
You need to be logged in to leave comments.
Login now