Sha256: 662440547f0e47a1a1fe6286cb3a82123dfdb751be8f00bcb8de96eab83f38ba

Contents?: true

Size: 1004 Bytes

Versions: 3

Compression:

Stored size: 1004 Bytes

Contents

require 'test_helper'

class NifsControllerTest < ActionController::TestCase
  setup do
    @nif = nifs(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:nifs)
  end

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

  test "should create nif" do
    assert_difference('Nif.count') do
      post :create, :nif => @nif.attributes
    end

    assert_redirected_to nif_path(assigns(:nif))
  end

  test "should show nif" do
    get :show, :id => @nif.to_param
    assert_response :success
  end

  test "should get edit" do
    get :edit, :id => @nif.to_param
    assert_response :success
  end

  test "should update nif" do
    put :update, :id => @nif.to_param, :nif => @nif.attributes
    assert_redirected_to nif_path(assigns(:nif))
  end

  test "should destroy nif" do
    assert_difference('Nif.count', -1) do
      delete :destroy, :id => @nif.to_param
    end

    assert_redirected_to nifs_path
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nifval-0.2.2 test_app/test/functional/nifs_controller_test.rb
nifval-0.2.1 test_app/test/functional/nifs_controller_test.rb
nifval-0.2.0 test_app/test/functional/nifs_controller_test.rb