Sha256: f817d07ecc532cca78a814858b9ee13e573fe3dfd5ae92e2a040d1bb094a77f8

Contents?: true

Size: 976 Bytes

Versions: 2

Compression:

Stored size: 976 Bytes

Contents

require 'test_helper'

class EmptiesControllerTest < ActionController::TestCase
  setup do
    @empty = empties(:one)
  end

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

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

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

    assert_redirected_to empty_path(assigns(:empty))
  end

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

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

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

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

    assert_redirected_to empties_path
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datashift-0.40.1 spec/dummy/test/controllers/empties_controller_test.rb
datashift-0.40.0 spec/dummy/test/controllers/empties_controller_test.rb