GeoRSS aggregator and Layar augmented reality server
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

50 líneas
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