Sha256: 075aaca10cab912b34ccca54332e71c24936ad9d4ba1448db1f7fce312a1dbab

Contents?: true

Size: 1.07 KB

Versions: 5

Compression:

Stored size: 1.07 KB

Contents

# encoding: utf-8
require 'test_helper'

module RedisDictionary
  class TranslationsControllerTest < ActionController::TestCase

    # produced error
    # test "should get index" do
    #   get :index, use_route: :redis_dictionary
    #   assert_response :success
    #   assert_not_nil assigns(:translations)
    # end

    test "should post create as HTML" do
      post :create, key: 'test.lol', value: 'lol', locale: 'es', use_route: :redis_dictionary, format: :html
      assert_redirected_to redis_dictionary_root_path
    end

    test "should post create as JS" do
      post :create, key: 'test.lol', value: 'lol', locale: 'es', use_route: :redis_dictionary, format: :js
      assert_not_nil assigns(:digest)
      assert_response :success
    end

    test "should delete destroy as HTML" do
      delete :destroy, use_route: :redis_dictionary, format: :html
      assert_redirected_to redis_dictionary_root_path

    end

    test "should delete destroy as JS" do
      delete :destroy, use_route: :redis_dictionary, format: :js
      assert_response :success
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
redis_dictionary-1.0.2 test/functional/redis_dictionary/translations_controller_test.rb
redis_dictionary-1.0.1 test/functional/redis_dictionary/translations_controller_test.rb
redis_dictionary-1.0.0 test/functional/redis_dictionary/translations_controller_test.rb
redis_dictionary-0.9.9 test/functional/redis_dictionary/translations_controller_test.rb
redis_dictionary-0.9.8 test/functional/redis_dictionary/translations_controller_test.rb