notebook/test/controllers/page_collections_controller_test.rb
2020-04-30 15:22:06 -05:00

49 lines
1.2 KiB
Ruby

require 'test_helper'
class PageCollectionsControllerTest < ActionDispatch::IntegrationTest
setup do
@page_collection = page_collections(:one)
end
test "should get index" do
get page_collections_url
assert_response :success
end
test "should get new" do
get new_page_collection_url
assert_response :success
end
test "should create page_collection" do
assert_difference('PageCollection.count') do
post page_collections_url, params: { page_collection: { } }
end
assert_redirected_to page_collection_url(PageCollection.last)
end
test "should show page_collection" do
get page_collection_url(@page_collection)
assert_response :success
end
test "should get edit" do
get edit_page_collection_url(@page_collection)
assert_response :success
end
test "should update page_collection" do
patch page_collection_url(@page_collection), params: { page_collection: { } }
assert_redirected_to page_collection_url(@page_collection)
end
test "should destroy page_collection" do
assert_difference('PageCollection.count', -1) do
delete page_collection_url(@page_collection)
end
assert_redirected_to page_collections_url
end
end