From e154e2735d9832994b0499d69732966abe2e3f5d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 27 Jul 2022 19:02:58 +0000 Subject: Add latest changes from gitlab-org/security/gitlab@15-0-stable-ee --- spec/models/todo_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/models/todo_spec.rb') diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb index 651e2cf273f..7a312a13259 100644 --- a/spec/models/todo_spec.rb +++ b/spec/models/todo_spec.rb @@ -475,4 +475,14 @@ RSpec.describe Todo do it { is_expected.to contain_exactly(user1.id, user2.id) } end + + describe '.for_internal_notes' do + it 'returns todos created from internal notes' do + internal_note = create(:note, confidential: true ) + todo = create(:todo, note: internal_note) + create(:todo) + + expect(described_class.for_internal_notes).to contain_exactly(todo) + end + end end -- cgit v1.2.1