Sha256: 08e2bb440cab2f72931cb3b3c7210959ce894a29aec1208da4d9fa4c88f93acc

Contents?: true

Size: 972 Bytes

Versions: 19

Compression:

Stored size: 972 Bytes

Contents

require 'test_helper'

class OrdersControllerTest < ActionController::TestCase
  setup do
    @order = orders(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:orders)
  end

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

  test "should create order" do
    assert_difference('Order.count') do
      post :create, order: {  }
    end

    assert_redirected_to order_path(assigns(:order))
  end

  test "should show order" do
    get :show, id: @order
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @order
    assert_response :success
  end

  test "should update order" do
    patch :update, id: @order, order: {  }
    assert_redirected_to order_path(assigns(:order))
  end

  test "should destroy order" do
    assert_difference('Order.count', -1) do
      delete :destroy, id: @order
    end

    assert_redirected_to orders_path
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
bootstrap_autocomplete_input-0.2.5 test/dummy/test/controllers/orders_controller_test.rb
bootstrap_autocomplete_input-0.2.4 test/dummy/test/controllers/orders_controller_test.rb
bootstrap_autocomplete_input-0.2.3 test/dummy/test/controllers/orders_controller_test.rb
bootstrap_autocomplete_input-0.2.1 test/dummy/test/controllers/orders_controller_test.rb
bootstrap_autocomplete_input-0.2.0 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.2.0 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.9 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.8 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.7 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.6 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.5 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.4 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.3 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.2 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.1 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.1.0 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.0.6 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.0.5 test/dummy/test/controllers/orders_controller_test.rb
bootstrap3_autocomplete_input-0.0.4 test/dummy/test/controllers/orders_controller_test.rb