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.

open_source_projects_controller_test.rb 1.3 kB

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

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