Sha256: 57c7aec4e80bc27458db36f6156eda5e81c92137cbc683958d9e5af0fb741502
Contents?: true
Size: 1.3 KB
Versions: 10
Compression:
Stored size: 1.3 KB
Contents
require 'test_helper' class CustomersControllerTest < ActionController::TestCase setup do @customer = customers(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:customers) end test "should get new" do get :new assert_response :success end test "should create customer" do assert_difference('Customer.count') do post :create, :customer => { :email_address => @customer.email_address, :first_name => @customer.first_name, :last_name => @customer.last_name, :phone => @customer.phone } end assert_redirected_to customer_path(assigns(:customer)) end test "should show customer" do get :show, :id => @customer assert_response :success end test "should get edit" do get :edit, :id => @customer assert_response :success end test "should update customer" do put :update, :id => @customer, :customer => { :email_address => @customer.email_address, :first_name => @customer.first_name, :last_name => @customer.last_name, :phone => @customer.phone } assert_redirected_to customer_path(assigns(:customer)) end test "should destroy customer" do assert_difference('Customer.count', -1) do delete :destroy, :id => @customer end assert_redirected_to customers_path end end
Version data entries
10 entries across 10 versions & 1 rubygems