Sha256: b577311dfc09c92b75b59efaa12325736af17c816d7c2858fca030528dd4763f
Contents?: true
Size: 1.3 KB
Versions: 7
Compression:
Stored size: 1.3 KB
Contents
require 'test_helper' class CampaignsControllerTest < ActionController::TestCase setup do @campaign = campaigns(:two) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:campaigns) end test "should get new" do get :new assert_response :success end test "should create campaign" do assert_difference('Campaign.count') do post :create, campaign: { advertiser_id: @campaign.advertiser_id, description: @campaign.description, name: @campaign.name, weight: @campaign.weight } end assert_redirected_to campaign_path(assigns(:campaign)) end test "should show campaign" do get :show, id: @campaign assert_response :success end test "should get edit" do get :edit, id: @campaign assert_response :success end test "should update campaign" do patch :update, id: campaigns(:one), campaign: { advertiser_id: @campaign.advertiser_id, description: @campaign.description, name: @campaign.name, weight: @campaign.weight } assert_redirected_to campaign_path(assigns(:campaign)) end test "should destroy campaign" do @campaign.epom_id = nil @campaign.save assert_difference('Campaign.count', -1) do delete :destroy, id: @campaign end assert_redirected_to campaigns_path end end
Version data entries
7 entries across 7 versions & 1 rubygems