mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
30 lines
693 B
Ruby
30 lines
693 B
Ruby
require 'test_helper'
|
|
|
|
class CalendarControllerTest < ActionController::TestCase
|
|
|
|
def test_show
|
|
login_as(:admin_user)
|
|
|
|
get :show
|
|
|
|
projects = [projects(:timemachine),
|
|
projects(:moremoney),
|
|
projects(:gardenclean)]
|
|
|
|
assert_equal "calendar", assigns['source_view']
|
|
assert_equal projects, assigns['projects']
|
|
assert_equal 8, assigns['count']
|
|
end
|
|
|
|
def test_show_ics
|
|
login_as(:admin_user)
|
|
get :show, params: { :format => 'ics' }
|
|
assert_equal 8, assigns['due_all'].count
|
|
end
|
|
|
|
def test_show_xml
|
|
login_as(:admin_user)
|
|
get :show, params: { :format => 'xml' }
|
|
assert_equal 8, assigns['due_all'].count
|
|
end
|
|
end
|