Sha256: 6fd29b68b72b6249b3df65e9bf4fc92eef9d801265929f06bc63d231c603d065

Contents?: true

Size: 1.51 KB

Versions: 59

Compression:

Stored size: 1.51 KB

Contents

require 'test_helper'

module TranslationCenter
  class TranslationsControllerTest < ActionController::TestCase
    setup do
      @translation = translations(:one)
    end
  
    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:translations)
    end
  
    test "should get new" do
      get :new
      assert_response :success
    end
  
    test "should create translation" do
      assert_difference('Translation.count') do
        post :create, translation: { lang: @translation.lang, status: @translation.status, translation_key_id: @translation.translation_key_id, user_id: @translation.user_id, value: @translation.value }
      end
  
      assert_redirected_to translation_path(assigns(:translation))
    end
  
    test "should show translation" do
      get :show, id: @translation
      assert_response :success
    end
  
    test "should get edit" do
      get :edit, id: @translation
      assert_response :success
    end
  
    test "should update translation" do
      put :update, id: @translation, translation: { lang: @translation.lang, status: @translation.status, translation_key_id: @translation.translation_key_id, user_id: @translation.user_id, value: @translation.value }
      assert_redirected_to translation_path(assigns(:translation))
    end
  
    test "should destroy translation" do
      assert_difference('Translation.count', -1) do
        delete :destroy, id: @translation
      end
  
      assert_redirected_to translations_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/translations_controller_test.rb
afalkear_translation_center-1.8.4 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.8.3 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.8.2 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.8.1 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.8.0 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.7.9 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.7.8 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-0.0.0 test/functional/translation_center/translations_controller_test.rb
afalkear_translation_center-1.7.7 test/functional/translation_center/translations_controller_test.rb
translation_center-1.7.1 test/functional/translation_center/translations_controller_test.rb
translation_center-1.7.0 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.10 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.9 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.8 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.7 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.6 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.5 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.4 test/functional/translation_center/translations_controller_test.rb
translation_center-1.6.3 test/functional/translation_center/translations_controller_test.rb