From a2cb92495c3149b69eb734596e80fbdd54b0b2dc Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Tue, 9 Jan 2018 12:06:28 -0800 Subject: Add test for permanent redirects of descendants --- spec/models/route_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.2.1