Sha256: 7fceea5c6ffe32e97b5025c78722ada87ed3776c1d20c31fc55b9f3d66692da4

Contents?: true

Size: 1.12 KB

Versions: 21

Compression:

Stored size: 1.12 KB

Contents

require 'test_helper'

module Ems
  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: @article.attributes
      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
      put :update, id: @article, article: @article.attributes
      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
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ems-0.1.12 test/functional/ems/articles_controller_test.rb
ems-0.1.11 test/functional/ems/articles_controller_test.rb
ems-0.1.10 test/functional/ems/articles_controller_test.rb
ems-0.1.9 test/functional/ems/articles_controller_test.rb
ems-0.1.8 test/functional/ems/articles_controller_test.rb
ems-0.1.7 test/functional/ems/articles_controller_test.rb
ems-0.1.6 test/functional/ems/articles_controller_test.rb
ems-0.1.5 test/functional/ems/articles_controller_test.rb
ems-0.1.4 test/functional/ems/articles_controller_test.rb
ems-0.1.3 test/functional/ems/articles_controller_test.rb
ems-0.1.2 test/functional/ems/articles_controller_test.rb
ems-0.1.1 test/functional/ems/articles_controller_test.rb
ems-0.1.0 test/functional/ems/articles_controller_test.rb
ems-0.0.9 test/functional/ems/articles_controller_test.rb
ems-0.0.8 test/functional/ems/articles_controller_test.rb
ems-0.0.7 test/functional/ems/articles_controller_test.rb
ems-0.0.6 test/functional/ems/articles_controller_test.rb
ems-0.0.5 test/functional/ems/articles_controller_test.rb
ems-0.0.4 test/functional/ems/articles_controller_test.rb
ems-0.0.3 test/functional/ems/articles_controller_test.rb