Sha256: 2ae369ad7e92a0ffafee5a5f6a65c9d4d7c043143f3b7dae09701afcb6fcb581

Contents?: true

Size: 1.17 KB

Versions: 59

Compression:

Stored size: 1.17 KB

Contents

require 'test_helper'

module TranslationCenter
  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: { name: @category.name }
      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: { name: @category.name }
      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

59 entries across 59 versions & 2 rubygems

Version Path
translation_center-1.7.2 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.8.4 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.8.3 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.8.2 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.8.1 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.8.0 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.7.9 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.7.8 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-0.0.0 test/functional/translation_center/categories_controller_test.rb
afalkear_translation_center-1.7.7 test/functional/translation_center/categories_controller_test.rb
translation_center-1.7.1 test/functional/translation_center/categories_controller_test.rb
translation_center-1.7.0 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.10 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.9 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.8 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.7 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.6 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.5 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.4 test/functional/translation_center/categories_controller_test.rb
translation_center-1.6.3 test/functional/translation_center/categories_controller_test.rb