summaryrefslogtreecommitdiff
path: root/spec/controllers/groups_controller_spec.rb
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-11 13:57:03 -0700
committerMichael Kozono <mkozono@gmail.com>2017-05-11 15:28:13 -0700
commitab98f8b5b1fb323ded965cdb352a504525dd0703 (patch)
tree9cfdb7654d532fd1fd514be8aeaa6c9dbf00faa6 /spec/controllers/groups_controller_spec.rb
parente7e132529bff3af38175076b84c818b6dea4b05f (diff)
downloadgitlab-ce-ab98f8b5b1fb323ded965cdb352a504525dd0703.tar.gz
Fix redirect message for groups and users
Diffstat (limited to 'spec/controllers/groups_controller_spec.rb')
-rw-r--r--spec/controllers/groups_controller_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb
index df8ea225814..15dae3231ca 100644
--- a/spec/controllers/groups_controller_spec.rb
+++ b/spec/controllers/groups_controller_spec.rb
@@ -101,7 +101,7 @@ describe GroupsController do
get :issues, id: redirect_route.path
expect(response).to redirect_to(issues_group_path(group.to_param))
- expect(controller).to set_flash[:notice].to(/moved/)
+ expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
end
end
end
@@ -146,7 +146,7 @@ describe GroupsController do
get :merge_requests, id: redirect_route.path
expect(response).to redirect_to(merge_requests_group_path(group.to_param))
- expect(controller).to set_flash[:notice].to(/moved/)
+ expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
end
end
end
@@ -249,4 +249,8 @@ describe GroupsController do
end
end
end
+
+ def group_moved_message(redirect_route, group)
+ "Group '#{redirect_route.path}' was moved to '#{group.full_path}'. Please update any links and bookmarks that may still have the old path."
+ end
end