socialforge/test/functional/contestnotifications_contro...

50 lines
1.8 KiB
Ruby

require 'test_helper'
class ContestnotificationsControllerTest < ActionController::TestCase
setup do
@contestnotification = contestnotifications(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:contestnotifications)
end
test "should get new" do
get :new
assert_response :success
end
test "should create contestnotification" do
assert_difference('Contestnotification.count') do
post :create, contestnotification: { author_id: @contestnotification.author_id, comments_count: @contestnotification.comments_count, contest_id: @contestnotification.contest_id, description: @contestnotification.description, summary: @contestnotification.summary, title: @contestnotification.title }
end
assert_redirected_to contestnotification_path(assigns(:contestnotification))
end
test "should show contestnotification" do
get :show, id: @contestnotification
assert_response :success
end
test "should get edit" do
get :edit, id: @contestnotification
assert_response :success
end
test "should update contestnotification" do
put :update, id: @contestnotification, contestnotification: { author_id: @contestnotification.author_id, comments_count: @contestnotification.comments_count, contest_id: @contestnotification.contest_id, description: @contestnotification.description, summary: @contestnotification.summary, title: @contestnotification.title }
assert_redirected_to contestnotification_path(assigns(:contestnotification))
end
test "should destroy contestnotification" do
assert_difference('Contestnotification.count', -1) do
delete :destroy, id: @contestnotification
end
assert_redirected_to contestnotifications_path
end
end