Sha256: 698bee6831a28463ace1cbe2a3f96b0be91e3b213d7835a9346c10fbf45ca909
Contents?: true
Size: 1.03 KB
Versions: 5
Compression:
Stored size: 1.03 KB
Contents
require 'test_helper' class ArticlesControllerTest < ActionController::TestCase setup do @article = articles(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:articles) end test "should get new" do get :new assert_response :success end test "should create article" do assert_difference('Article.count') do post :create, article: { title: @article.title } end assert_redirected_to article_path(assigns(:article)) end test "should show article" do get :show, id: @article assert_response :success end test "should get edit" do get :edit, id: @article assert_response :success end test "should update article" do patch :update, id: @article, article: { title: @article.title } assert_redirected_to article_path(assigns(:article)) end test "should destroy article" do assert_difference('Article.count', -1) do delete :destroy, id: @article end assert_redirected_to articles_path end end
Version data entries
5 entries across 5 versions & 1 rubygems