summaryrefslogtreecommitdiff
path: root/spec/models/todo_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-19 18:09:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-19 18:09:34 +0000
commitd4e22f4ade1ce4dfd54f4d1740f074b2be441705 (patch)
tree5f1f1bbe3c7673905804170bfd1becf665d4b0b5 /spec/models/todo_spec.rb
parentc18599314d98c0aa4dfe7d56423469f0b641d066 (diff)
downloadgitlab-ce-d4e22f4ade1ce4dfd54f4d1740f074b2be441705.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/todo_spec.rb')
-rw-r--r--spec/models/todo_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb
index 23ba0be2fbc..221f09dd87f 100644
--- a/spec/models/todo_spec.rb
+++ b/spec/models/todo_spec.rb
@@ -56,6 +56,15 @@ RSpec.describe Todo do
expect(subject.body).to eq 'quick fix'
end
+
+ it 'returns full path of target when action is member_access_requested' do
+ group = create(:group)
+
+ subject.target = group
+ subject.action = Todo::MEMBER_ACCESS_REQUESTED
+
+ expect(subject.body).to eq group.full_path
+ end
end
describe '#done' do
@@ -182,6 +191,17 @@ RSpec.describe Todo do
expect(subject.target_reference).to eq issue.to_reference(full: false)
end
+
+ context 'when target is member access requested' do
+ it 'returns group full path' do
+ group = create(:group)
+
+ subject.target = group
+ subject.action = Todo::MEMBER_ACCESS_REQUESTED
+
+ expect(subject.target_reference).to eq group.full_path
+ end
+ end
end
describe '#self_added?' do