Sha256: 6647372e45ed20356bf6605fa5822e156aa22a89cc522cc6abec0de7704b38a3
Contents?: true
Size: 954 Bytes
Versions: 4
Compression:
Stored size: 954 Bytes
Contents
require 'test_helper' class BoxesControllerTest < ActionController::TestCase setup do @box = boxes(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:boxes) end test "should get new" do get :new assert_response :success end test "should create box" do assert_difference('Box.count') do post :create, box: @box.attributes end assert_redirected_to box_path(assigns(:box)) end test "should show box" do get :show, id: @box assert_response :success end test "should get edit" do get :edit, id: @box assert_response :success end test "should update box" do put :update, id: @box, box: @box.attributes assert_redirected_to box_path(assigns(:box)) end test "should destroy box" do assert_difference('Box.count', -1) do delete :destroy, id: @box end assert_redirected_to boxes_path end end
Version data entries
4 entries across 4 versions & 2 rubygems