You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

forums_controller_test.rb 1.0 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. require 'test_helper'
  2. class ForumsControllerTest < ActionController::TestCase
  3. setup do
  4. @forum = forums(:one)
  5. end
  6. test "should get index" do
  7. get :index
  8. assert_response :success
  9. assert_not_nil assigns(:forums)
  10. end
  11. test "should get new" do
  12. get :new
  13. assert_response :success
  14. end
  15. test "should create forum" do
  16. assert_difference('Forum.count') do
  17. post :create, forum: { }
  18. end
  19. assert_redirected_to forum_path(assigns(:forum))
  20. end
  21. test "should show forum" do
  22. get :show, id: @forum
  23. assert_response :success
  24. end
  25. test "should get edit" do
  26. get :edit, id: @forum
  27. assert_response :success
  28. end
  29. test "should update forum" do
  30. put :update, id: @forum, forum: { }
  31. assert_redirected_to forum_path(assigns(:forum))
  32. end
  33. test "should destroy forum" do
  34. assert_difference('Forum.count', -1) do
  35. delete :destroy, id: @forum
  36. end
  37. assert_redirected_to forums_path
  38. end
  39. end

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...