Sha256: 9b9e90809f9e38ce35f1275b82c9688bb36e1541272200c67166184bf044e3bf
Contents?: true
Size: 1.43 KB
Versions: 6
Compression:
Stored size: 1.43 KB
Contents
require 'test_helper' module Wafflemix class ContactFormsControllerTest < ActionController::TestCase setup do @contact_form = contact_forms(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:contact_forms) end test "should get new" do get :new assert_response :success end test "should create contact_form" do assert_difference('ContactForm.count') do post :create, contact_form: { email: @contact_form.email, message: @contact_form.message, name: @contact_form.name, subject: @contact_form.subject } end assert_redirected_to contact_form_path(assigns(:contact_form)) end test "should show contact_form" do get :show, id: @contact_form assert_response :success end test "should get edit" do get :edit, id: @contact_form assert_response :success end test "should update contact_form" do put :update, id: @contact_form, contact_form: { email: @contact_form.email, message: @contact_form.message, name: @contact_form.name, subject: @contact_form.subject } assert_redirected_to contact_form_path(assigns(:contact_form)) end test "should destroy contact_form" do assert_difference('ContactForm.count', -1) do delete :destroy, id: @contact_form end assert_redirected_to contact_forms_path end end end
Version data entries
6 entries across 6 versions & 1 rubygems