summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-16 20:58:49 +0100
committerhukl <contact@smyck.org>2009-03-18 12:16:59 +0100
commitd2bfbfd2810fbee673e43b2515db8bac527b3441 (patch)
tree1b46e8af44c871290a7a74ab17a8c7201e22f7a9 /test/functional
parentd957a33a0d50f00c1968c5d12e728bd73ea186b3 (diff)
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.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/events_controller_test.rb45
-rw-r--r--test/functional/occurrences_controller_test.rb45
2 files changed, 90 insertions, 0 deletions
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 @@
1require 'test_helper'
2
3class EventsControllerTest < ActionController::TestCase
4 # test "should get index" do
5 # get :index
6 # assert_response :success
7 # assert_not_nil assigns(:events)
8 # end
9 #
10 # test "should get new" do
11 # get :new
12 # assert_response :success
13 # end
14 #
15 # test "should create event" do
16 # assert_difference('Event.count') do
17 # post :create, :event => { }
18 # end
19 #
20 # assert_redirected_to event_path(assigns(:event))
21 # end
22 #
23 # test "should show event" do
24 # get :show, :id => events(:one).to_param
25 # assert_response :success
26 # end
27 #
28 # test "should get edit" do
29 # get :edit, :id => events(:one).to_param
30 # assert_response :success
31 # end
32 #
33 # test "should update event" do
34 # put :update, :id => events(:one).to_param, :event => { }
35 # assert_redirected_to event_path(assigns(:event))
36 # end
37 #
38 # test "should destroy event" do
39 # assert_difference('Event.count', -1) do
40 # delete :destroy, :id => events(:one).to_param
41 # end
42 #
43 # assert_redirected_to events_path
44 # end
45end
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 @@
1require 'test_helper'
2
3class OccurrencesControllerTest < ActionController::TestCase
4 # test "should get index" do
5 # get :index
6 # assert_response :success
7 # assert_not_nil assigns(:occurrences)
8 # end
9 #
10 # test "should get new" do
11 # get :new
12 # assert_response :success
13 # end
14 #
15 # test "should create occurrence" do
16 # assert_difference('Occurrence.count') do
17 # post :create, :occurrence => { }
18 # end
19 #
20 # assert_redirected_to occurrence_path(assigns(:occurrence))
21 # end
22 #
23 # test "should show occurrence" do
24 # get :show, :id => occurrences(:one).to_param
25 # assert_response :success
26 # end
27 #
28 # test "should get edit" do
29 # get :edit, :id => occurrences(:one).to_param
30 # assert_response :success
31 # end
32 #
33 # test "should update occurrence" do
34 # put :update, :id => occurrences(:one).to_param, :occurrence => { }
35 # assert_redirected_to occurrence_path(assigns(:occurrence))
36 # end
37 #
38 # test "should destroy occurrence" do
39 # assert_difference('Occurrence.count', -1) do
40 # delete :destroy, :id => occurrences(:one).to_param
41 # end
42 #
43 # assert_redirected_to occurrences_path
44 # end
45end