Commit bbcf505a376d58204a010ee0457b67ca00337985
1 parent
c140dcd8
Exists in
master
and in
29 other branches
Fixing tests
Showing
3 changed files
with
7 additions
and
6 deletions
Show diff stats
test/functional/profile_controller_test.rb
| ... | ... | @@ -156,7 +156,7 @@ class ProfileControllerTest < Test::Unit::TestCase |
| 156 | 156 | community = Community.create!(:name => 'my test community') |
| 157 | 157 | community.add_admin(@profile) |
| 158 | 158 | get :index, :profile => community.identifier |
| 159 | - assert_tag :tag => 'a', :attributes => { :href => /\/myprofile\/%\{login\}/ }, :content => 'Control panel' | |
| 159 | + assert_tag :tag => 'a', :attributes => { :href => /\/myprofile\/\{login\}/ }, :content => 'Control panel' | |
| 160 | 160 | end |
| 161 | 161 | |
| 162 | 162 | should 'show create community in own profile' do | ... | ... |
test/integration/manage_documents_test.rb
| ... | ... | @@ -8,7 +8,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
| 8 | 8 | create_user('myuser') |
| 9 | 9 | |
| 10 | 10 | login('myuser', 'myuser') |
| 11 | - assert_tag :tag => 'a', :attributes => { :href => '/myprofile/%{login}' } | |
| 11 | + assert_tag :tag => 'a', :attributes => { :href => '/myprofile/{login}' } | |
| 12 | 12 | |
| 13 | 13 | get '/myprofile/myuser' |
| 14 | 14 | assert_response :success |
| ... | ... | @@ -38,7 +38,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
| 38 | 38 | article.save! |
| 39 | 39 | |
| 40 | 40 | login('myuser', 'myuser') |
| 41 | - assert_tag :tag => 'a', :attributes => { :href => '/myprofile/%{login}' } | |
| 41 | + assert_tag :tag => 'a', :attributes => { :href => '/myprofile/{login}' } | |
| 42 | 42 | |
| 43 | 43 | get '/myprofile/myuser' |
| 44 | 44 | assert_response :success |
| ... | ... | @@ -72,7 +72,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
| 72 | 72 | |
| 73 | 73 | login('myuser', 'myuser') |
| 74 | 74 | |
| 75 | - assert_tag :tag => 'a', :attributes => { :href => '/myprofile/%{login}' } | |
| 75 | + assert_tag :tag => 'a', :attributes => { :href => '/myprofile/{login}' } | |
| 76 | 76 | get '/myprofile/myuser' |
| 77 | 77 | assert_response :success |
| 78 | 78 | ... | ... |
test/unit/events_helper_test.rb
| ... | ... | @@ -5,10 +5,11 @@ class EventsHelperTest < Test::Unit::TestCase |
| 5 | 5 | include EventsHelper |
| 6 | 6 | |
| 7 | 7 | should 'list events' do |
| 8 | + stubs(:user) | |
| 8 | 9 | expects(:show_date).returns('') |
| 9 | 10 | expects(:_).with('Events for %s').returns('') |
| 10 | - event1 = mock; event1.expects(:public?).returns(true); event1.expects(:name).returns('Event 1'); event1.expects(:url).returns({}) | |
| 11 | - event2 = mock; event2.expects(:public?).returns(true); event2.expects(:name).returns('Event 2'); event2.expects(:url).returns({}) | |
| 11 | + event1 = mock; event1.expects(:display_to?).with(anything).returns(true); event1.expects(:name).returns('Event 1'); event1.expects(:url).returns({}) | |
| 12 | + event2 = mock; event2.expects(:display_to?).with(anything).returns(true); event2.expects(:name).returns('Event 2'); event2.expects(:url).returns({}) | |
| 12 | 13 | result = list_events('', [event1, event2]) |
| 13 | 14 | assert_match /Event 1/, result |
| 14 | 15 | assert_match /Event 2/, result | ... | ... |