summaryrefslogtreecommitdiff
path: root/spec/models/todo_spec.rb
diff options
context:
space:
mode:
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