Skip to content

Commit

Permalink
Add right test
Browse files Browse the repository at this point in the history
  • Loading branch information
korotindev committed Mar 8, 2015
1 parent cebeca3 commit db02351
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/controllers/web/admin/news_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
class Web::Admin::NewsControllerTest < ActionController::TestCase
setup do
@news = create :news
@admin = create :admin
sign_in @admin
end

test "should get index" do
Expand Down Expand Up @@ -57,10 +55,9 @@ class Web::Admin::NewsControllerTest < ActionController::TestCase
end

test "should destroy news" do
assert_difference('News.count', -1) do
delete :destroy, id: @news
end

assert_redirected_to admin_news_index_path
count = News.count
delete :destroy, id: @news
@news.reload
assert @news.removed?
end
end

0 comments on commit db02351

Please sign in to comment.