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>2022-08-18 11:17:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /spec/models/projects/topic_spec.rb
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/models/projects/topic_spec.rb')
-rw-r--r--spec/models/projects/topic_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/projects/topic_spec.rb b/spec/models/projects/topic_spec.rb
index fc9d9bef437..f9659ef352c 100644
--- a/spec/models/projects/topic_spec.rb
+++ b/spec/models/projects/topic_spec.rb
@@ -30,6 +30,17 @@ RSpec.describe Projects::Topic do
end
describe 'scopes' do
+ describe 'without_assigned_projects' do
+ let_it_be(:unassigned_topic) { create(:topic, name: 'unassigned topic') }
+ let_it_be(:project) { create(:project, :public, topic_list: 'topic') }
+
+ it 'returns topics without assigned projects' do
+ topics = described_class.without_assigned_projects
+
+ expect(topics).to contain_exactly(unassigned_topic)
+ end
+ end
+
describe 'order_by_non_private_projects_count' do
let!(:topic1) { create(:topic, name: 'topicB') }
let!(:topic2) { create(:topic, name: 'topicC') }