Fix trailing whitespace
This commit is contained in:
parent
7eeeaa7d22
commit
c57c598204
@ -268,5 +268,5 @@ private
|
|||||||
project.members << m
|
project.members << m
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -18,7 +18,7 @@ class Change < ActiveRecord::Base
|
|||||||
before_save :init_path
|
before_save :init_path
|
||||||
|
|
||||||
delegate :repository_encoding, :to => :changeset, :allow_nil => true, :prefix => true
|
delegate :repository_encoding, :to => :changeset, :allow_nil => true, :prefix => true
|
||||||
|
|
||||||
def relative_path
|
def relative_path
|
||||||
changeset.repository.relative_path(path)
|
changeset.repository.relative_path(path)
|
||||||
end
|
end
|
||||||
|
@ -82,7 +82,7 @@ class Changeset < ActiveRecord::Base
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Committer of the Changeset
|
# Committer of the Changeset
|
||||||
#
|
#
|
||||||
# Attribute reader for committer that encodes the committer string to
|
# Attribute reader for committer that encodes the committer string to
|
||||||
@ -278,7 +278,7 @@ class Changeset < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
txtar = ""
|
txtar = ""
|
||||||
begin
|
begin
|
||||||
txtar += Iconv.new('UTF-8', normalized_encoding).iconv(str)
|
txtar += Iconv.new('UTF-8', normalized_encoding).iconv(str)
|
||||||
|
@ -549,7 +549,7 @@ class Issue < ActiveRecord::Base
|
|||||||
def nested_set_span
|
def nested_set_span
|
||||||
rgt - lft
|
rgt - lft
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a string of css classes that apply to the issue
|
# Returns a string of css classes that apply to the issue
|
||||||
def css_classes
|
def css_classes
|
||||||
s = "issue status-#{status.position} priority-#{priority.position}"
|
s = "issue status-#{status.position} priority-#{priority.position}"
|
||||||
|
@ -34,7 +34,7 @@ class UpdateJournalsForActsAsJournalized < ActiveRecord::Migration
|
|||||||
rescue ActiveRecord::RecordInvalid => ex
|
rescue ActiveRecord::RecordInvalid => ex
|
||||||
puts "Error saving: #{j.class.to_s}##{j.id} - #{ex.message}"
|
puts "Error saving: #{j.class.to_s}##{j.id} - #{ex.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -51,14 +51,14 @@ class BuildInitialJournalsForActsAsJournalized < ActiveRecord::Migration
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
# No-op
|
# No-op
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -34,15 +34,15 @@ class AddChangesFromJournalDetailsForActsAsJournalized < ActiveRecord::Migration
|
|||||||
rescue ActiveRecord::RecordInvalid => ex
|
rescue ActiveRecord::RecordInvalid => ex
|
||||||
puts "Error saving: #{journal.class.to_s}##{journal.id} - #{ex.message}"
|
puts "Error saving: #{journal.class.to_s}##{journal.id} - #{ex.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
# No-op
|
# No-op
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -86,7 +86,7 @@ class IssuesTest < ActionController::IntegrationTest
|
|||||||
assert_select "a", :text => /testfile.txt/
|
assert_select "a", :text => /testfile.txt/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# remove the attachments
|
# remove the attachments
|
||||||
Issue.find(1).attachments.each(&:destroy)
|
Issue.find(1).attachments.each(&:destroy)
|
||||||
assert_equal 0, Issue.find(1).attachments.length
|
assert_equal 0, Issue.find(1).attachments.length
|
||||||
|
@ -882,7 +882,7 @@ class IssueTest < ActiveSupport::TestCase
|
|||||||
issue.update_attribute(:description, "Description with newlines\n\nembedded")
|
issue.update_attribute(:description, "Description with newlines\n\nembedded")
|
||||||
issue.reload
|
issue.reload
|
||||||
assert issue.description.include?("\n")
|
assert issue.description.include?("\n")
|
||||||
|
|
||||||
assert_no_difference("Journal.count") do
|
assert_no_difference("Journal.count") do
|
||||||
issue.safe_attributes= {
|
issue.safe_attributes= {
|
||||||
'description' => "Description with newlines\r\n\r\nembedded"
|
'description' => "Description with newlines\r\n\r\nembedded"
|
||||||
@ -892,5 +892,5 @@ class IssueTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
assert_equal "Description with newlines\n\nembedded", issue.reload.description
|
assert_equal "Description with newlines\n\nembedded", issue.reload.description
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -39,7 +39,7 @@ class JournalObserverTest < ActiveSupport::TestCase
|
|||||||
assert @issue.save
|
assert @issue.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "#after_create for 'issue_note_added'" do
|
context "#after_create for 'issue_note_added'" do
|
||||||
@ -49,7 +49,7 @@ class JournalObserverTest < ActiveSupport::TestCase
|
|||||||
@issue.init_journal(@user, 'This update has a note')
|
@issue.init_journal(@user, 'This update has a note')
|
||||||
assert @issue.save
|
assert @issue.save
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not send a notification with not configured" do
|
should "not send a notification with not configured" do
|
||||||
@ -58,7 +58,7 @@ class JournalObserverTest < ActiveSupport::TestCase
|
|||||||
@issue.init_journal(@user, 'This update has a note')
|
@issue.init_journal(@user, 'This update has a note')
|
||||||
assert @issue.save
|
assert @issue.save
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ class JournalObserverTest < ActiveSupport::TestCase
|
|||||||
assert @issue.save
|
assert @issue.save
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not send a notification with not configured" do
|
should "not send a notification with not configured" do
|
||||||
@ -93,7 +93,7 @@ class JournalObserverTest < ActiveSupport::TestCase
|
|||||||
@issue.priority = IssuePriority.generate!
|
@issue.priority = IssuePriority.generate!
|
||||||
assert @issue.save
|
assert @issue.save
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not send a notification with not configured" do
|
should "not send a notification with not configured" do
|
||||||
@ -103,7 +103,7 @@ class JournalObserverTest < ActiveSupport::TestCase
|
|||||||
@issue.priority = IssuePriority.generate!
|
@issue.priority = IssuePriority.generate!
|
||||||
assert @issue.save
|
assert @issue.save
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -73,13 +73,13 @@ class JournalTest < ActiveSupport::TestCase
|
|||||||
assert_difference("Journal.count") do
|
assert_difference("Journal.count") do
|
||||||
assert issue.save
|
assert issue.save
|
||||||
end
|
end
|
||||||
|
|
||||||
journal = issue.reload.journals.first
|
journal = issue.reload.journals.first
|
||||||
assert_equal ["","Test initial journal"], journal.changes["subject"]
|
assert_equal ["","Test initial journal"], journal.changes["subject"]
|
||||||
assert_equal [0, @project.id], journal.changes["project_id"]
|
assert_equal [0, @project.id], journal.changes["project_id"]
|
||||||
assert_equal [nil, "Some content"], journal.changes["description"]
|
assert_equal [nil, "Some content"], journal.changes["description"]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "creating a journal should update the updated_on value of the parent record (touch)" do
|
test "creating a journal should update the updated_on value of the parent record (touch)" do
|
||||||
@user = User.generate!
|
@user = User.generate!
|
||||||
@project = Project.generate!
|
@project = Project.generate!
|
||||||
|
@ -145,6 +145,6 @@ class MessageTest < ActiveSupport::TestCase
|
|||||||
message = Message.new(:board => @board, :subject => 'Test message', :content => 'Test message content', :author => @user)
|
message = Message.new(:board => @board, :subject => 'Test message', :content => 'Test message content', :author => @user)
|
||||||
assert message.save
|
assert message.save
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user