mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-09 14:12:37 +01:00
And here's the copy step.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@501 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
c34d9faa38
commit
06f14dd3b9
1721 changed files with 200174 additions and 0 deletions
30
tracks/test/functional/feedlist_controller_test.rb
Normal file
30
tracks/test/functional/feedlist_controller_test.rb
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
require 'feedlist_controller'
|
||||
|
||||
# Re-raise errors caught by the controller.
|
||||
class FeedlistController; def rescue_action(e) raise e end; end
|
||||
|
||||
class FeedlistControllerTest < Test::Unit::TestCase
|
||||
fixtures :users, :preferences, :projects, :contexts, :todos, :notes
|
||||
|
||||
def setup
|
||||
assert_equal "test", ENV['RAILS_ENV']
|
||||
assert_equal "change-me", Tracks::Config.salt
|
||||
@controller = FeedlistController.new
|
||||
@request = ActionController::TestRequest.new
|
||||
@response = ActionController::TestResponse.new
|
||||
end
|
||||
|
||||
def test_get_index_when_not_logged_in
|
||||
get :index
|
||||
assert_redirected_to :controller => 'login', :action => 'login'
|
||||
end
|
||||
|
||||
def test_get_index_by_logged_in_user
|
||||
@request.session['user_id'] = users(:other_user).id
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_equal "TRACKS::Feeds", assigns['page_title']
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue