Sha256: 78db78aadbf24ceef0fe0ae10b3f63b49a8b20a688eb74bf2a983534c533aa5d
Contents?: true
Size: 1.65 KB
Versions: 9
Compression:
Stored size: 1.65 KB
Contents
require 'test_helper' class BannersControllerTest < ActionController::TestCase setup do @banner = banners(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:banners) end test "should get new" do get :new assert_response :success end test "should create banner" do assert_difference('Banner.count') do post :create, banner: { ad_unit_height: @banner.ad_unit_height, ad_unit_id: @banner.ad_unit_id, ad_unit_width: @banner.ad_unit_width, banner_type: @banner.banner_type, campaign_id: @banner.campaign_id, epom_id: @banner.epom_id, image_banner_link: @banner.image_banner_link, name: @banner.name, placement_type: @banner.placement_type, url: @banner.url, weight: @banner.weight } end assert_redirected_to banner_path(assigns(:banner)) end test "should show banner" do get :show, id: @banner assert_response :success end test "should get edit" do get :edit, id: @banner assert_response :success end test "should update banner" do patch :update, id: @banner, banner: { ad_unit_height: @banner.ad_unit_height, ad_unit_id: @banner.ad_unit_id, ad_unit_width: @banner.ad_unit_width, banner_type: @banner.banner_type, campaign_id: @banner.campaign_id, epom_id: @banner.epom_id, image_banner_link: @banner.image_banner_link, name: @banner.name, placement_type: @banner.placement_type, url: @banner.url, weight: @banner.weight } assert_redirected_to banner_path(assigns(:banner)) end test "should destroy banner" do assert_difference('Banner.count', -1) do delete :destroy, id: @banner end assert_redirected_to banners_path end end
Version data entries
9 entries across 9 versions & 1 rubygems