summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-01-09 12:06:28 -0800
committerMichael Kozono <mkozono@gmail.com>2018-01-09 12:06:28 -0800
commita2cb92495c3149b69eb734596e80fbdd54b0b2dc (patch)
treee6c4ad07cba139c47e55f686b517cb0b85b8b148
parent8040edcce8b4e736b4f4857e6709f94aeb5e274c (diff)
downloadgitlab-ce-a2cb92495c3149b69eb734596e80fbdd54b0b2dc.tar.gz
Add test for permanent redirects of descendants
-rw-r--r--spec/models/route_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/route_spec.rb b/spec/models/route_spec.rb
index 2f141d96144..f800e63ce48 100644
--- a/spec/models/route_spec.rb
+++ b/spec/models/route_spec.rb
@@ -75,6 +75,20 @@ describe Route do
end
end
end
+
+ context 'when the group has a subgroup' do
+ let!(:subgroup) { create(:group, parent: group) }
+
+ context 'when path was changed, and then changed back to the original' do
+ # Should this be valid?
+ it 'is valid' do
+ group.update!(path: 'git_lab2')
+ group.path = 'git_lab'
+
+ expect(group.valid?).to be_truthy
+ end
+ end
+ end
end
end