summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorerdgeist <erdgeist@bauklotz.local>2009-03-10 21:03:52 +0100
committererdgeist <erdgeist@bauklotz.local>2009-03-10 21:03:52 +0100
commit26687eaf7400aea5d569f99e880ac3949982f303 (patch)
tree7bd22978d1022de16a41428d65398edab628bf3c /test/functional
parentd6049aeffc7de43393a9a7a1d2f95f26422a046f (diff)
added calendar backend. more features and integration to come
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/events_controller_test.rb45
1 files changed, 45 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..24a6f94
--- /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).id
25 assert_response :success
26 end
27
28 test "should get edit" do
29 get :edit, :id => events(:one).id
30 assert_response :success
31 end
32
33 test "should update event" do
34 put :update, :id => events(:one).id, :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).id
41 end
42
43 assert_redirected_to events_path
44 end
45end