Sha256: 978262938f6bfbcbbb085e5582643bfc64bdd471b21ac0fa4f969d6459176ed9
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
require 'test_helper' class ParentResourcesControllerTest < ActionController::TestCase setup do @parent_resource = parent_resources(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:parent_resources) end test "should get new" do get :new assert_response :success end test "should create parent_resource" do assert_difference('ParentResource.count') do post :create, parent_resource: { description: @parent_resource.description, name: @parent_resource.name } end assert_redirected_to parent_resource_path(assigns(:parent_resource)) end test "should show parent_resource" do get :show, id: @parent_resource assert_response :success end test "should get edit" do get :edit, id: @parent_resource assert_response :success end test "should update parent_resource" do put :update, id: @parent_resource, parent_resource: { description: @parent_resource.description, name: @parent_resource.name } assert_redirected_to parent_resource_path(assigns(:parent_resource)) end test "should destroy parent_resource" do assert_difference('ParentResource.count', -1) do delete :destroy, id: @parent_resource end assert_redirected_to parent_resources_path end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alberich-0.2.0 | test/dummy/test/functional/parent_resources_controller_test.rb |