Skip to content

Commit da05d33

Browse files
kfischer-okarinRedmine Patch Meetup
authored andcommitted
Add test for delete redirect link
1 parent 85c7d10 commit da05d33

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/functional/wiki_controller_test.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ def test_show_protected_page_shoud_show_locked_badge
186186
end
187187
end
188188

189+
def test_show_delete_redirect_links
190+
@request.session[:user_id] = 2
191+
192+
wiki_page = WikiPage.find_by(title: 'CookBook_documentation')
193+
new_title = 'New_Cookbook'
194+
wiki_page.title = new_title
195+
wiki_page.save
196+
197+
get :show, :params => {:project_id => 1, :id => new_title}
198+
199+
assert_select '.drdn-items' do
200+
assert_select 'a.icon-link-break', text: 'Delete redirect from CookBook_documentation'
201+
end
202+
end
203+
189204
def test_get_new
190205
@request.session[:user_id] = 2
191206

0 commit comments

Comments
 (0)