Sha256: 5a4be0e91ca0f7cd02384b6d5328e8033a71825a42bd0ffe0a1290c1c5b8c510
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
require 'test_helper' module RailsAdserver class AdvertisementsControllerTest < ActionController::TestCase setup do @advertisement = advertisements(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:advertisements) end test "should get new" do get :new assert_response :success end test "should create advertisement" do assert_difference('Advertisement.count') do post :create, advertisement: @advertisement.attributes end assert_redirected_to advertisement_path(assigns(:advertisement)) end test "should show advertisement" do get :show, id: @advertisement assert_response :success end test "should get edit" do get :edit, id: @advertisement assert_response :success end test "should update advertisement" do put :update, id: @advertisement, advertisement: @advertisement.attributes assert_redirected_to advertisement_path(assigns(:advertisement)) end test "should destroy advertisement" do assert_difference('Advertisement.count', -1) do delete :destroy, id: @advertisement end assert_redirected_to advertisements_path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_adserver-1.0.1 | test/functional/rails_adserver/advertisements_controller_test.rb |
rails_adserver-1.0.0 | test/functional/rails_adserver/advertisements_controller_test.rb |