Add tests for the ICS and XML views and fix them up

This commit is contained in:
Matt Rogers 2013-04-30 20:38:10 -05:00
parent ebd182695d
commit 98b188d1df
2 changed files with 21 additions and 1 deletions

View file

@ -27,4 +27,16 @@ class CalendarControllerTest < ActionController::TestCase
assert_equal [], assigns['calendar'].due_after_this_month
assert_equal 8, assigns['count']
end
def test_show_ics
login_as(:admin_user)
get :show, :format => 'ics'
assert_equal 8, assigns['due_all'].count
end
def test_show_xml
login_as(:admin_user)
get :show, :format => 'xml'
assert_equal 8, assigns['due_all'].count
end
end