kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
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.
41 lines
1.3 KiB
41 lines
1.3 KiB
11 years ago
|
#-- copyright
|
||
11 years ago
|
# OpenProject Meeting Plugin
|
||
|
#
|
||
|
# Copyright (C) 2011-2014 the OpenProject Foundation (OPF)
|
||
11 years ago
|
#
|
||
|
# This program is free software; you can redistribute it and/or
|
||
|
# modify it under the terms of the GNU General Public License version 3.
|
||
|
#
|
||
11 years ago
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
11 years ago
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with this program; if not, write to the Free Software
|
||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
#
|
||
|
# See doc/COPYRIGHT.md for more details.
|
||
11 years ago
|
#++
|
||
|
|
||
12 years ago
|
module PluginSpecHelper
|
||
10 years ago
|
shared_examples_for 'customized journal class' do
|
||
10 years ago
|
describe '#save' do
|
||
10 years ago
|
let(:text) { 'Lorem ipsum' }
|
||
10 years ago
|
let(:changed_data) { { text: [nil, text] } }
|
||
12 years ago
|
|
||
10 years ago
|
describe 'WITHOUT compression' do
|
||
12 years ago
|
before do
|
||
10 years ago
|
# we have to save here because changed_data will update (and save) attributes and miss an ID
|
||
12 years ago
|
journal.save!
|
||
11 years ago
|
journal.changed_data = changed_data
|
||
12 years ago
|
|
||
|
journal.reload
|
||
|
end
|
||
|
|
||
11 years ago
|
it { expect(journal.changed_data[:text][1]).to eq(text) }
|
||
12 years ago
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|