GeoRSS aggregator and Layar augmented reality server
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

layers_controller_test.rb 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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