From 26687eaf7400aea5d569f99e880ac3949982f303 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 10 Mar 2009 21:03:52 +0100 Subject: added calendar backend. more features and integration to come --- test/functional/events_controller_test.rb | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test/functional/events_controller_test.rb (limited to 'test/functional') diff --git a/test/functional/events_controller_test.rb b/test/functional/events_controller_test.rb new file mode 100644 index 0000000..24a6f94 --- /dev/null +++ b/test/functional/events_controller_test.rb @@ -0,0 +1,45 @@ +require 'test_helper' + +class EventsControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:events) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create event" do + assert_difference('Event.count') do + post :create, :event => { } + end + + assert_redirected_to event_path(assigns(:event)) + end + + test "should show event" do + get :show, :id => events(:one).id + assert_response :success + end + + test "should get edit" do + get :edit, :id => events(:one).id + assert_response :success + end + + test "should update event" do + put :update, :id => events(:one).id, :event => { } + assert_redirected_to event_path(assigns(:event)) + end + + test "should destroy event" do + assert_difference('Event.count', -1) do + delete :destroy, :id => events(:one).id + end + + assert_redirected_to events_path + end +end -- cgit v1.3