Sha256: feb8e20d0eaa6278c9a4f2efbcef960aac5acb591a75fb9cd64619e7b95417cd

Contents?: true

Size: 1.45 KB

Versions: 24

Compression:

Stored size: 1.45 KB

Contents

require 'test_helper'

module KepplerFrontend
  class ViewsControllerTest < ActionDispatch::IntegrationTest
    include Engine.routes.url_helpers

    setup do
      @view = keppler_frontend_views(:one)
    end

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

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

    test "should create view" do
      assert_difference('View.count') do
        post views_url, params: { view: { active: @view.active, deleted_at: @view.deleted_at, format_result: @view.format_result, method: @view.method, name: @view.name, position: @view.position, root_path: @view.root_path, url: @view.url } }
      end

      assert_redirected_to view_url(View.last)
    end

    test "should show view" do
      get view_url(@view)
      assert_response :success
    end

    test "should get edit" do
      get edit_view_url(@view)
      assert_response :success
    end

    test "should update view" do
      patch view_url(@view), params: { view: { active: @view.active, deleted_at: @view.deleted_at, format_result: @view.format_result, method: @view.method, name: @view.name, position: @view.position, root_path: @view.root_path, url: @view.url } }
      assert_redirected_to view_url(@view)
    end

    test "should destroy view" do
      assert_difference('View.count', -1) do
        delete view_url(@view)
      end

      assert_redirected_to views_url
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

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