diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
commit | 14bd84b61276ef29b97d23642d698de769bacfd2 (patch) | |
tree | f9eba90140c1bd874211dea17750a0d422c04080 /spec/lib/gitlab/issuable_sorter_spec.rb | |
parent | 891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff) |
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'spec/lib/gitlab/issuable_sorter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/issuable_sorter_spec.rb | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/spec/lib/gitlab/issuable_sorter_spec.rb b/spec/lib/gitlab/issuable_sorter_spec.rb index b8d0c7b0609..0d9940bab6f 100644 --- a/spec/lib/gitlab/issuable_sorter_spec.rb +++ b/spec/lib/gitlab/issuable_sorter_spec.rb @@ -4,16 +4,42 @@ require 'spec_helper' RSpec.describe Gitlab::IssuableSorter do let(:namespace1) { build_stubbed(:namespace, id: 1) } - let(:project1) { build_stubbed(:project, id: 1, namespace: namespace1) } - - let(:project2) { build_stubbed(:project, id: 2, path: "a", namespace: project1.namespace) } - let(:project3) { build_stubbed(:project, id: 3, path: "b", namespace: project1.namespace) } - let(:namespace2) { build_stubbed(:namespace, id: 2, path: "a") } let(:namespace3) { build_stubbed(:namespace, id: 3, path: "b") } - let(:project4) { build_stubbed(:project, id: 4, path: "a", namespace: namespace2) } - let(:project5) { build_stubbed(:project, id: 5, path: "b", namespace: namespace2) } - let(:project6) { build_stubbed(:project, id: 6, path: "a", namespace: namespace3) } + + let(:project1) do + build_stubbed(:project, id: 1, namespace: namespace1, project_namespace: build_stubbed(:project_namespace)) + end + + let(:project2) do + build_stubbed( + :project, id: 2, path: "a", namespace: project1.namespace, project_namespace: build_stubbed(:project_namespace) + ) + end + + let(:project3) do + build_stubbed( + :project, id: 3, path: "b", namespace: project1.namespace, project_namespace: build_stubbed(:project_namespace) + ) + end + + let(:project4) do + build_stubbed( + :project, id: 4, path: "a", namespace: namespace2, project_namespace: build_stubbed(:project_namespace) + ) + end + + let(:project5) do + build_stubbed( + :project, id: 5, path: "b", namespace: namespace2, project_namespace: build_stubbed(:project_namespace) + ) + end + + let(:project6) do + build_stubbed( + :project, id: 6, path: "a", namespace: namespace3, project_namespace: build_stubbed(:project_namespace) + ) + end let(:unsorted) { [sorted[2], sorted[3], sorted[0], sorted[1]] } |