mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
move tests to new directory
This commit is contained in:
parent
65859807ea
commit
0bc9b0397a
42 changed files with 23 additions and 32 deletions
29
test/controllers/feedlist_controller_test.rb
Normal file
29
test/controllers/feedlist_controller_test.rb
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
||||
|
||||
class FeedlistControllerTest < ActionController::TestCase
|
||||
|
||||
def test_get_index_when_not_logged_in
|
||||
get :index
|
||||
assert_redirected_to login_path
|
||||
end
|
||||
|
||||
def test_get_index_by_logged_in_user
|
||||
login_as :other_user
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_equal "TRACKS::Feeds", assigns['page_title']
|
||||
end
|
||||
|
||||
def test_get_feeds_for_context_using_xhr
|
||||
login_as(:admin_user)
|
||||
xhr :get, :get_feeds_for_context, :context_id => contexts(:errand).id
|
||||
assert_response 200
|
||||
end
|
||||
|
||||
def test_get_feeds_for_project_using_xhr
|
||||
login_as(:admin_user)
|
||||
xhr :get, :get_feeds_for_project, :project_id => projects(:timemachine).id
|
||||
assert_response 200
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue