Commit f4e85b8c7ec1aea2e4e54143bff7dc371c7fb1cd
1 parent
d860b283
Exists in
master
and in
28 other branches
Testing redirection to profile after set_home_page
(ActionItem1938)
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
test/functional/cms_controller_test.rb
| ... | ... | @@ -144,6 +144,14 @@ class CmsControllerTest < Test::Unit::TestCase |
| 144 | 144 | assert_redirected_to '/random_page' |
| 145 | 145 | end |
| 146 | 146 | |
| 147 | + should 'redirect to profile homepage after setting home page if no referer' do | |
| 148 | + a = profile.articles.build(:name => 'my new home page') | |
| 149 | + a.save! | |
| 150 | + | |
| 151 | + post :set_home_page, :profile => profile.identifier, :id => a.id | |
| 152 | + assert_redirected_to profile.url | |
| 153 | + end | |
| 154 | + | |
| 147 | 155 | should 'set last_changed_by when creating article' do |
| 148 | 156 | login_as(profile.identifier) |
| 149 | 157 | ... | ... |