Skip to content

Commit

Permalink
fix test for news
Browse files Browse the repository at this point in the history
  • Loading branch information
korotindev committed Mar 8, 2015
1 parent 9c21940 commit efeb100
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/controllers/web/admin/news_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ class Web::Admin::NewsControllerTest < ActionController::TestCase

test "should create news" do
attributes = attributes_for :news

post :create, news: attributes
assert_response :redirect

news = News.last
assert_equal attributes[:title], news.title
assert_response :redirect, @response.body
assert_redirected_to admin_news_index_path
assert_equal attributes[:title], News.last.title
end

test "should not create news" do
Expand Down

0 comments on commit efeb100

Please sign in to comment.