Sha256: 6b3972e7040f90b5492d458127711ddc16bdb619b183c9b46efd3d47bbf46313

Contents?: true

Size: 1.73 KB

Versions: 4

Compression:

Stored size: 1.73 KB

Contents

class <%= nom_clase_plural %>ControllerTest < ActionController::TestCase
  setup do
    skip
    @<%= nom_arch %> = <%= nom_clase %>(:one)
  end

  test "should get index" do
    skip
    get :index
    assert_response :success
    assert_not_nil assigns(:<%= nom_arch %>)
  end

  test "should get new" do
    skip
    get :new
    assert_response :success
  end

  test "should create <%= nom_arch %>" do
    skip
    assert_difference('<%= nom_clase %>.count') do
      post :create, <%= nom_arch %>: { created_at: @<%= nom_arch %>.created_at, fechacreacion: @<%= nom_arch %>.fechacreacion, fechadeshabilitacion: @<%= nom_arch %>.fechadeshabilitacion, nombre: @<%= nom_arch %>.nombre, observaciones: @<%= nom_arch %>.observaciones, updated_at: @<%= nom_arch %>.updated_at }
    end

    assert_redirected_to <%= nom_arch %>_path(assigns(:<%= nom_arch %>))
  end

  test "should show <%= nom_arch %>" do
    skip
    get :show, id: @<%= nom_arch %>
    assert_response :success
  end

  test "should get edit" do
    skip
    get :edit, id: @<%= nom_arch %>
    assert_response :success
  end

  test "should update <%= nom_arch %>" do
    skip
    patch :update, id: @<%= nom_arch %>, <%= nom_arch %>: { created_at: @<%= nom_arch %>.created_at, fechacreacion: @<%= nom_arch %>.fechacreacion, fechadeshabilitacion: @<%= nom_arch %>.fechadeshabilitacion, nombre: @<%= nom_arch %>.nombre, observaciones: @<%= nom_arch %>.observaciones, updated_at: @<%= nom_arch %>.updated_at }
    assert_redirected_to <%= nom_arch %>_path(assigns(:<%= nom_arch %>))
  end

  test "should destroy <%= nom_arch %>" do
    skip
    assert_difference('<%= nom_clase %>.count', -1) do
      delete :destroy, id: @<%= nom_arch %>
    end

    assert_redirected_to <%= nom_arch %>es_path
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
msip-2.2.0.beta1 lib/generators/msip/templates/modelos_controller_test.rb.erb
msip-2.2.0.alfa3 lib/generators/msip/templates/modelos_controller_test.rb.erb
msip-2.2.0.alfa2 lib/generators/msip/templates/modelos_controller_test.rb.erb
msip-2.2a2 lib/generators/msip/templates/modelos_controller_test.rb.erb