From d2bfbfd2810fbee673e43b2515db8bac527b3441 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 16 Mar 2009 20:58:49 +0100 Subject: Refactored Chaos Calendar by wrapping libical and introducing event and occurrence model. More improvements to come. Enables us to create events with reoccurrence and intervals etc. --- test/functional/events_controller_test.rb | 45 ++++++++++++++++++++++++++ test/functional/occurrences_controller_test.rb | 45 ++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 test/functional/events_controller_test.rb create mode 100644 test/functional/occurrences_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..5698c7b --- /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).to_param + # assert_response :success + # end + # + # test "should get edit" do + # get :edit, :id => events(:one).to_param + # assert_response :success + # end + # + # test "should update event" do + # put :update, :id => events(:one).to_param, :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).to_param + # end + # + # assert_redirected_to events_path + # end +end diff --git a/test/functional/occurrences_controller_test.rb b/test/functional/occurrences_controller_test.rb new file mode 100644 index 0000000..0b00e0e --- /dev/null +++ b/test/functional/occurrences_controller_test.rb @@ -0,0 +1,45 @@ +require 'test_helper' + +class OccurrencesControllerTest < ActionController::TestCase + # test "should get index" do + # get :index + # assert_response :success + # assert_not_nil assigns(:occurrences) + # end + # + # test "should get new" do + # get :new + # assert_response :success + # end + # + # test "should create occurrence" do + # assert_difference('Occurrence.count') do + # post :create, :occurrence => { } + # end + # + # assert_redirected_to occurrence_path(assigns(:occurrence)) + # end + # + # test "should show occurrence" do + # get :show, :id => occurrences(:one).to_param + # assert_response :success + # end + # + # test "should get edit" do + # get :edit, :id => occurrences(:one).to_param + # assert_response :success + # end + # + # test "should update occurrence" do + # put :update, :id => occurrences(:one).to_param, :occurrence => { } + # assert_redirected_to occurrence_path(assigns(:occurrence)) + # end + # + # test "should destroy occurrence" do + # assert_difference('Occurrence.count', -1) do + # delete :destroy, :id => occurrences(:one).to_param + # end + # + # assert_redirected_to occurrences_path + # end +end -- cgit v1.3