Links, mainly...
This commit is contained in:
parent
fd42a3f173
commit
21ab02d647
69 changed files with 2258 additions and 155 deletions
49
test/controllers/link_categories_controller_test.rb
Normal file
49
test/controllers/link_categories_controller_test.rb
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
require "test_helper"
|
||||
|
||||
class LinkCategoriesControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@link_category = link_categories(:one)
|
||||
end
|
||||
|
||||
test "should get index" do
|
||||
get link_categories_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get new_link_category_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create link_category" do
|
||||
assert_difference("LinkCategory.count") do
|
||||
post link_categories_url, params: { link_category: { description: @link_category.description, name: @link_category.name } }
|
||||
end
|
||||
|
||||
assert_redirected_to link_category_url(LinkCategory.last)
|
||||
end
|
||||
|
||||
test "should show link_category" do
|
||||
get link_category_url(@link_category)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get edit_link_category_url(@link_category)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update link_category" do
|
||||
patch link_category_url(@link_category), params: { link_category: { description: @link_category.description, name: @link_category.name } }
|
||||
assert_redirected_to link_category_url(@link_category)
|
||||
end
|
||||
|
||||
test "should destroy link_category" do
|
||||
assert_difference("LinkCategory.count", -1) do
|
||||
link_category = link_categories(:deletable)
|
||||
delete link_category_url(link_category)
|
||||
end
|
||||
|
||||
assert_redirected_to link_categories_url
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue