Sha256: dfa500a1e3ecd5e9ae49bc7652901b35059dc7845ba3f332849dd59f08a0efc5

Contents?: true

Size: 1.03 KB

Versions: 30

Compression:

Stored size: 1.03 KB

Contents

require 'test_helper'

class PeopleControllerTest < ActionController::TestCase
  setup do
    @person = people(:one)
  end

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

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

  test "should create person" do
    assert_difference('Person.count') do
      post :create, person: @person.attributes
    end

    assert_redirected_to person_path(assigns(:person))
  end

  test "should show person" do
    get :show, id: @person.to_param
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @person.to_param
    assert_response :success
  end

  test "should update person" do
    put :update, id: @person.to_param, person: @person.attributes
    assert_redirected_to person_path(assigns(:person))
  end

  test "should destroy person" do
    assert_difference('Person.count', -1) do
      delete :destroy, id: @person.to_param
    end

    assert_redirected_to people_path
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
blogit-0.0.13 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.12 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.11 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.10 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.9 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.8 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.7 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.6 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.5 spec/dummy/test/functional/people_controller_test.rb
blogit-0.0.4 spec/dummy/test/functional/people_controller_test.rb