Sha256: 7e88d08a9b468b666a185127c6768eee3ca3658c5bc39cdc7c21c8c196855d06

Contents?: true

Size: 1.28 KB

Versions: 24

Compression:

Stored size: 1.28 KB

Contents

require 'test_helper'

module KepplerLanguages
  class FieldsControllerTest < ActionDispatch::IntegrationTest
    include Engine.routes.url_helpers

    setup do
      @field = keppler_languages_fields(:one)
    end

    test "should get index" do
      get fields_url
      assert_response :success
    end

    test "should get new" do
      get new_field_url
      assert_response :success
    end

    test "should create field" do
      assert_difference('Field.count') do
        post fields_url, params: { field: { deleted_at: @field.deleted_at, key: @field.key, position: @field.position, value: @field.value } }
      end

      assert_redirected_to field_url(Field.last)
    end

    test "should show field" do
      get field_url(@field)
      assert_response :success
    end

    test "should get edit" do
      get edit_field_url(@field)
      assert_response :success
    end

    test "should update field" do
      patch field_url(@field), params: { field: { deleted_at: @field.deleted_at, key: @field.key, position: @field.position, value: @field.value } }
      assert_redirected_to field_url(@field)
    end

    test "should destroy field" do
      assert_difference('Field.count', -1) do
        delete field_url(@field)
      end

      assert_redirected_to fields_url
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
keppler-2.1.22 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.21 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.20 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.19 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.18 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.17 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.16 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.15 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.14 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.13 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.12 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.11 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.10 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.9 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.8 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.7 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.6 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.5 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.4 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb
keppler-2.1.3 installer/core/rockets/keppler_languages/test/controllers/keppler_languages/fields_controller_test.rb