summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-28 13:14:04 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-28 13:14:04 +0100
commit0b8a2779e788bd05180176a11ac585fd7999b76b (patch)
tree9426c5fe4eb41513af5066889891c10187da6f9b /spec/models/concerns
parent4c7665f2f930bba855646143684070544044de10 (diff)
parent0f800a5c0532508c84cee24bf44a4b9ce68168a2 (diff)
downloadgitlab-ce-0b8a2779e788bd05180176a11ac585fd7999b76b.tar.gz
Merge branch 'master' into fix/gb/encrypt-runners-tokens
* master: (243 commits) Conflicts: db/schema.rb lib/gitlab/import_export/import_export.yml
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/relative_positioning_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/concerns/relative_positioning_spec.rb b/spec/models/concerns/relative_positioning_spec.rb
index 66c1f47d12b..ac8da30b6c9 100644
--- a/spec/models/concerns/relative_positioning_spec.rb
+++ b/spec/models/concerns/relative_positioning_spec.rb
@@ -14,6 +14,14 @@ describe RelativePositioning do
expect(issue.prev_relative_position).to eq nil
expect(issue1.next_relative_position).to eq nil
end
+
+ it 'does not perform any moves if all issues have their relative_position set' do
+ issue.update!(relative_position: 1)
+
+ expect(issue).not_to receive(:save)
+
+ Issue.move_to_end([issue])
+ end
end
describe '#max_relative_position' do