GeoRSS aggregator and Layar augmented reality server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1004 B

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