Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/models/concerns/sidebars/positionable_list_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/models/concerns/sidebars/positionable_list_spec.rb')
-rw-r--r--spec/models/concerns/sidebars/positionable_list_spec.rb59
1 files changed, 0 insertions, 59 deletions
diff --git a/spec/models/concerns/sidebars/positionable_list_spec.rb b/spec/models/concerns/sidebars/positionable_list_spec.rb
deleted file mode 100644
index 231aa5295dd..00000000000
--- a/spec/models/concerns/sidebars/positionable_list_spec.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Sidebars::PositionableList do
- subject do
- Class.new do
- include Sidebars::PositionableList
- end.new
- end
-
- describe '#add_element' do
- it 'adds the element to the last position of the list' do
- list = [1, 2]
-
- subject.add_element(list, 3)
-
- expect(list).to eq([1, 2, 3])
- end
- end
-
- describe '#insert_element_before' do
- let(:user) { build(:user) }
- let(:list) { [1, user] }
-
- it 'adds element before the specific element class' do
- subject.insert_element_before(list, User, 2)
-
- expect(list).to eq [1, 2, user]
- end
-
- context 'when reference element does not exist' do
- it 'adds the element to the top of the list' do
- subject.insert_element_before(list, Project, 2)
-
- expect(list).to eq [2, 1, user]
- end
- end
- end
-
- describe '#insert_element_after' do
- let(:user) { build(:user) }
- let(:list) { [1, user] }
-
- it 'adds element after the specific element class' do
- subject.insert_element_after(list, Integer, 2)
-
- expect(list).to eq [1, 2, user]
- end
-
- context 'when reference element does not exist' do
- it 'adds the element to the end of the list' do
- subject.insert_element_after(list, Project, 2)
-
- expect(list).to eq [1, user, 2]
- end
- end
- end
-end