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