Sha256: 1a0d4deebd4f4ba1b919d333d28ac4d0b913e3049de05ea7384b1ac65b950855

Contents?: true

Size: 1021 Bytes

Versions: 1

Compression:

Stored size: 1021 Bytes

Contents

require 'test_helper'

class AuthorsControllerTest < ActionController::TestCase
  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:authors)
  end

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

  test "should create author" do
    assert_difference('Author.count') do
      post :create, :author => { }
    end

    assert_redirected_to author_path(assigns(:author))
  end

  test "should show author" do
    get :show, :id => authors(:one).to_param
    assert_response :success
  end

  test "should get edit" do
    get :edit, :id => authors(:one).to_param
    assert_response :success
  end

  test "should update author" do
    put :update, :id => authors(:one).to_param, :author => { }
    assert_redirected_to author_path(assigns(:author))
  end

  test "should destroy author" do
    assert_difference('Author.count', -1) do
      delete :destroy, :id => authors(:one).to_param
    end

    assert_redirected_to authors_path
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-services-0.1.5 test/rails_app_v2/test/functional/authors_controller_test.rb