Commit d5c404cab9868396fda4959d706e416548394fa3
1 parent
5e9787c8
Exists in
master
and in
8 other branches
Removing unecessary tests from cms controller
The first one should not test the redirect since it's not its concerns. The second one wasn't test if there was a confirmation at all.
Showing
1 changed file
with
0 additions
and
9 deletions
Show diff stats
test/functional/cms_controller_test.rb
| ... | ... | @@ -202,9 +202,7 @@ class CmsControllerTest < ActionController::TestCase |
| 202 | 202 | a = profile.articles.build(:name => 'my-article') |
| 203 | 203 | a.save! |
| 204 | 204 | assert_difference Article, :count, -1 do |
| 205 | - @request.env['HTTP_REFERER'] = url_for :controller => 'cms', :profile => profile.identifier, :action => 'index' | |
| 206 | 205 | post :destroy, :profile => profile.identifier, :id => a.id |
| 207 | - assert_redirected_to :controller => 'cms', :profile => profile.identifier, :action => 'index' | |
| 208 | 206 | end |
| 209 | 207 | end |
| 210 | 208 | |
| ... | ... | @@ -903,13 +901,6 @@ class CmsControllerTest < ActionController::TestCase |
| 903 | 901 | assert_tag :tag => 'a', :content => 'New content' |
| 904 | 902 | end |
| 905 | 903 | |
| 906 | - should 'offer confirmation to remove article' do | |
| 907 | - a = profile.articles.create!(:name => 'my-article') | |
| 908 | - @request.env['HTTP_REFERER'] = url_for :controller => 'cms', :profile => profile.identifier, :action => 'index' | |
| 909 | - post :destroy, :profile => profile.identifier, :id => a.id | |
| 910 | - assert_response :redirect | |
| 911 | - end | |
| 912 | - | |
| 913 | 904 | should 'display notify comments option' do |
| 914 | 905 | a = profile.articles.create!(:name => 'test') |
| 915 | 906 | get :edit, :profile => profile.identifier, :id => a.id | ... | ... |