Sha256: bd00a03ce1e60800353dd476bd6ab3e44dd3bad1543f136df889a0ea5c4f9e25

Contents?: true

Size: 639 Bytes

Versions: 2

Compression:

Stored size: 639 Bytes

Contents

require 'test_helper'

class OrdersControllerTest < ActionController::TestCase
#class OrdersControllerTest < ActionDispatch::IntegrationTest
#class OrdersControllerTest < ActiveSupport::TestCase

  test 'respond to :copy' do
    assert @controller.respond_to?(:copy)
    order = Order.create :name => 'name'
#    n = Order.all.length
    Order.all.length

    put :copy, params: { id: order.id }
    assert_response :success
    assert_template 'rows/new'
    assert_match(/New Order/, response.body)
  end

  test 'coverage: multi deletion' do
    delete :multi_deletion
    assert response
    assert_redirected_to orders_url
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rows_controller-2.1.3 test/controllers/rows_ext_controller_test.rb
rows_controller-2.1.2 test/controllers/rows_ext_controller_test.rb