Sha256: 3fc1525e1b0a193dcdc6951eab848dd6db9db9d8e33323b1a881a731ee17c6e4
Contents?: true
Size: 1.39 KB
Versions: 17
Compression:
Stored size: 1.39 KB
Contents
require 'test_helper' class AdvertisersControllerTest < ActionController::TestCase setup do @advertiser = advertisers(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:advertisers) end test "should get new" do get :new assert_response :success end test "should create advertiser" do assert_difference('Advertiser.count') do post :create, advertiser: { contact_email: @advertiser.contact_email, contact_name: @advertiser.contact_name, description: @advertiser.description, epom_id: @advertiser.epom_id, name: @advertiser.name } end assert_redirected_to advertiser_path(assigns(:advertiser)) end test "should show advertiser" do get :show, id: @advertiser assert_response :success end test "should get edit" do get :edit, id: @advertiser assert_response :success end test "should update advertiser" do patch :update, id: @advertiser, advertiser: { contact_email: @advertiser.contact_email, contact_name: @advertiser.contact_name, description: @advertiser.description, epom_id: @advertiser.epom_id, name: @advertiser.name } assert_redirected_to advertiser_path(assigns(:advertiser)) end test "should destroy advertiser" do assert_difference('Advertiser.count', -1) do delete :destroy, id: @advertiser end assert_redirected_to advertisers_path end end
Version data entries
17 entries across 17 versions & 1 rubygems