@@ -73,6 +73,7 class ActivitiesControllerTest < ActionController::TestCase | |||||
73 | end |
|
73 | end | |
74 |
|
74 | |||
75 | def test_user_index |
|
75 | def test_user_index | |
|
76 | @request.session[:user_id] = 1 | |||
76 | get :index, :user_id => 2 |
|
77 | get :index, :user_id => 2 | |
77 | assert_response :success |
|
78 | assert_response :success | |
78 | assert_template 'index' |
|
79 | assert_template 'index' | |
@@ -80,8 +81,11 class ActivitiesControllerTest < ActionController::TestCase | |||||
80 |
|
81 | |||
81 | assert_select 'h2 a[href=/users/2]', :text => 'John Smith' |
|
82 | assert_select 'h2 a[href=/users/2]', :text => 'John Smith' | |
82 |
|
83 | |||
|
84 | i1 = Issue.find(1) | |||
|
85 | d1 = User.find(1).time_to_date(i1.created_on) | |||
|
86 | ||||
83 | assert_tag :tag => "h3", |
|
87 | assert_tag :tag => "h3", | |
84 |
:content => /#{ |
|
88 | :content => /#{d1.day}/, | |
85 | :sibling => { :tag => "dl", |
|
89 | :sibling => { :tag => "dl", | |
86 | :child => { :tag => "dt", |
|
90 | :child => { :tag => "dt", | |
87 | :attributes => { :class => /issue/ }, |
|
91 | :attributes => { :class => /issue/ }, |
General Comments 0
You need to be logged in to leave comments.
Login now