Sha256: 967268f8298a81dda23db1f9b9f9f2ac9984cb417bf28521fe8999890742be89
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
Contents
require 'test_helper' module Contactify class ContactsControllerTest < ActionController::TestCase setup do @contact = contacts(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:contacts) end test "should get new" do get :new assert_response :success end test "should create contact" do assert_difference('Contact.count') do post :create, contact: { comment: @contact.comment, email: @contact.email, first_name: @contact.first_name, last_name: @contact.last_name } end assert_redirected_to contact_path(assigns(:contact)) end test "should show contact" do get :show, id: @contact assert_response :success end test "should get edit" do get :edit, id: @contact assert_response :success end test "should update contact" do put :update, id: @contact, contact: { comment: @contact.comment, email: @contact.email, first_name: @contact.first_name, last_name: @contact.last_name } assert_redirected_to contact_path(assigns(:contact)) end test "should destroy contact" do assert_difference('Contact.count', -1) do delete :destroy, id: @contact end assert_redirected_to contacts_path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
contactify-0.1 | test/functional/contactify/contacts_controller_test.rb |