Sha256: 7c7615924a00d97191a528035fe44712db00a166398c456e00bdfa14569454f0

Contents?: true

Size: 1009 Bytes

Versions: 1

Compression:

Stored size: 1009 Bytes

Contents

require 'test_helper'

class ChipsControllerTest < ActionController::TestCase
  setup do
    @chip = chips(:one)
  end

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

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

  test "should create chip" do
    assert_difference('Chip.count') do
      post :create, chip: @chip.attributes
    end

    assert_redirected_to chip_path(assigns(:chip))
  end

  test "should show chip" do
    get :show, id: @chip.to_param
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @chip.to_param
    assert_response :success
  end

  test "should update chip" do
    put :update, id: @chip.to_param, chip: @chip.attributes
    assert_redirected_to chip_path(assigns(:chip))
  end

  test "should destroy chip" do
    assert_difference('Chip.count', -1) do
      delete :destroy, id: @chip.to_param
    end

    assert_redirected_to chips_path
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
routespec-0.0.1 test/rails311/test/functional/chips_controller_test.rb