OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/spec/models/journal_manager_spec.rb

20 lines
724 B

require 'spec_helper'
describe JournalManager do
describe '#self.changed?' do
context 'when only the newline character representation has changed' do
let(:description_with_newline) { "Description\nContains newline character" }
let(:description_with_other_newline) { description_with_newline.gsub("\n", "\r\n") }
let(:journable) do
FactoryGirl.create(:work_package, description: description_with_newline).tap do |journable|
# replace newline character and apply another change
journable.assign_attributes description: description_with_other_newline
end
end
subject { JournalManager.changed? journable }
it { should be_false }
end
end
end