tracks/test/controllers/calendar_controller_test.rb
Brett A. Rogers f18f1c7345 Move calendar test down to unit tests
Remove tests that are specific to the calendar model from controller
test and move them to unit tests.
2013-07-19 17:27:38 -05:00

30 lines
681 B
Ruby

require_relative '../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, :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