Sha256: 3c99fdc95c941e7945809bac8039e5c3ef60842ddaee86e6e4bb5826c7d3dc72

Contents?: true

Size: 1.15 KB

Versions: 21

Compression:

Stored size: 1.15 KB

Contents

require 'test_helper'

module Ems
  class CategoriesControllerTest < ActionController::TestCase
    setup do
      @category = categories(:one)
    end
  
    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:categories)
    end
  
    test "should get new" do
      get :new
      assert_response :success
    end
  
    test "should create category" do
      assert_difference('Category.count') do
        post :create, category: @category.attributes
      end
  
      assert_redirected_to category_path(assigns(:category))
    end
  
    test "should show category" do
      get :show, id: @category
      assert_response :success
    end
  
    test "should get edit" do
      get :edit, id: @category
      assert_response :success
    end
  
    test "should update category" do
      put :update, id: @category, category: @category.attributes
      assert_redirected_to category_path(assigns(:category))
    end
  
    test "should destroy category" do
      assert_difference('Category.count', -1) do
        delete :destroy, id: @category
      end
  
      assert_redirected_to categories_path
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

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