Sha256: b46b99602e6ef9e33aa50ca1bb8675807f2d7f0631856d1d20535075320e472e

Contents?: true

Size: 1.24 KB

Versions: 20

Compression:

Stored size: 1.24 KB

Contents

require 'test_helper'

class LeadsControllerTest < ActionController::TestCase
  setup do
    @lead = leads(:one)
  end

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

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

  test "should create lead" do
    assert_difference('Lead.count') do
      post :create, lead: { company: @lead.company, email: @lead.email, job_title: @lead.job_title, last_name: @lead.last_name, name: @lead.name, phone: @lead.phone, website: @lead.website }
    end

    assert_redirected_to lead_path(assigns(:lead))
  end

  test "should show lead" do
    get :show, id: @lead
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @lead
    assert_response :success
  end

  test "should update lead" do
    patch :update, id: @lead, lead: { company: @lead.company, email: @lead.email, job_title: @lead.job_title, last_name: @lead.last_name, name: @lead.name, phone: @lead.phone, website: @lead.website }
    assert_redirected_to lead_path(assigns(:lead))
  end

  test "should destroy lead" do
    assert_difference('Lead.count', -1) do
      delete :destroy, id: @lead
    end

    assert_redirected_to leads_path
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
leads_to_highrise-0.3.19 test/controllers/leads_controller_test.rb
leads_to_highrise-0.3.18 test/controllers/leads_controller_test.rb
leads_to_highrise-0.3.17 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.16 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.15 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.14 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.13 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.12 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.11 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.10 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.9 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.8 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.7 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.6 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.5 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.4 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.3 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.2 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.1 test/controllers/leads_controller_test.rb
leads_to_highrise-0.2.0 test/controllers/leads_controller_test.rb