diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-14 08:25:37 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-17 07:39:16 +0100 |
commit | 310b417b0f2336e5e7a9b44da2fabf5d4abb0cb4 (patch) | |
tree | 5978f51dbf31c2337721950ed5e3a22e7a0146e7 /spec | |
parent | 4354bfaba55c9238d5245fe2f5823665790c9817 (diff) | |
download | gitlab-ce-310b417b0f2336e5e7a9b44da2fabf5d4abb0cb4.tar.gz |
Preserve original author when moving issue
This also wrapps entire process into transation, as rewriting references
may have large memory footprint.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/issues/move_service_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb index d516bd4830a..4fcfceaddd4 100644 --- a/spec/services/issues/move_service_spec.rb +++ b/spec/services/issues/move_service_spec.rb @@ -74,13 +74,13 @@ describe Issues::MoveService, services: true do expect(new_issue.persisted?).to be true end - it 'persist all changes' do + it 'persists all changes' do expect(old_issue.changed?).to be false - expect(new_issue.changed?).to be false + expect(new_issue.persisted?).to be true end - it 'changes author' do - expect(new_issue.author).to eq user + it 'preserves author' do + expect(new_issue.author).to eq author end it 'removes data that is invalid in new context' do |