Commit 7f13e8f4f2b35c6990b177dcdbee2e72919eaaa2
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branches 'rails3' and 'rails3_AI3033-serpro_integration' into rails3_AI3033-serpro_integration
Showing
18 changed files
with
91 additions
and
118 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -1091,10 +1091,10 @@ module ApplicationHelper |
1091 | 1091 | link_to_all = nil |
1092 | 1092 | if list.count > 5 |
1093 | 1093 | list = list.first(5) |
1094 | - link_to_all = link_to(content_tag('strong', _('See all')), :controller => 'memberships', :profile => current_user.login) | |
1094 | + link_to_all = link_to(content_tag('strong', _('See all')), :controller => 'memberships', :profile => user.identifier) | |
1095 | 1095 | end |
1096 | 1096 | link = list.map do |element| |
1097 | - link_to(content_tag('strong', [_('<span>Manage</span> %s') % element.short_name(25)]), @environment.top_url + "/myprofile/#{element.identifier}", :class => "icon-menu-"+element.class.identification.underscore, :title => [_('Manage %s') % element.short_name]) | |
1097 | + link_to(content_tag('strong', _('<span>Manage</span> %s') % element.short_name(25)), element.admin_url, :class => "icon-menu-"+element.class.identification.underscore, :title => _('Manage %s') % element.short_name) | |
1098 | 1098 | end |
1099 | 1099 | if link_to_all |
1100 | 1100 | link << link_to_all |
... | ... | @@ -1118,15 +1118,15 @@ module ApplicationHelper |
1118 | 1118 | pending_tasks_count = '' |
1119 | 1119 | count = user ? Task.to(user).pending.count : -1 |
1120 | 1120 | if count > 0 |
1121 | - pending_tasks_count = link_to(count.to_s, @environment.top_url + '/myprofile/{login}/tasks', :id => 'pending-tasks-count', :title => _("Manage your pending tasks")) | |
1121 | + pending_tasks_count = link_to(count.to_s, user.tasks_url, :id => 'pending-tasks-count', :title => _("Manage your pending tasks")) | |
1122 | 1122 | end |
1123 | 1123 | |
1124 | - (_("<span class='welcome'>Welcome,</span> %s") % link_to('<i style="background-image:url({avatar})"></i><strong>{login}</strong>', @environment.top_url + '/{login}', :id => "homepage-link", :title => _('Go to your homepage'))) + | |
1124 | + (_("<span class='welcome'>Welcome,</span> %s") % link_to("<i style='background-image:url(#{user.profile_custom_icon(gravatar_default)})'></i><strong>#{user.identifier}</strong>", user.public_profile_url, :id => "homepage-link", :title => _('Go to your homepage'))) + | |
1125 | 1125 | render_environment_features(:usermenu) + |
1126 | - link_to('<i class="icon-menu-admin"></i><strong>' + _('Administration') + '</strong>', @environment.top_url + '/admin', :title => _("Configure the environment"), :class => 'admin-link', :style => 'display: none') + | |
1126 | + link_to('<i class="icon-menu-admin"></i><strong>' + _('Administration') + '</strong>', @environment.admin_url, :title => _("Configure the environment"), :class => 'admin-link') + | |
1127 | 1127 | manage_enterprises.to_s + |
1128 | 1128 | manage_communities.to_s + |
1129 | - link_to('<i class="icon-menu-ctrl-panel"></i><strong>' + _('Control panel') + '</strong>', @environment.top_url + '/myprofile/{login}', :class => 'ctrl-panel', :title => _("Configure your personal account and content")) + | |
1129 | + link_to('<i class="icon-menu-ctrl-panel"></i><strong>' + _('Control panel') + '</strong>', user.admin_url, :class => 'ctrl-panel', :title => _("Configure your personal account and content")) + | |
1130 | 1130 | pending_tasks_count + |
1131 | 1131 | link_to('<i class="icon-menu-logout"></i><strong>' + _('Logout') + '</strong>', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) |
1132 | 1132 | end | ... | ... |
app/models/environment.rb
... | ... | @@ -637,6 +637,10 @@ class Environment < ActiveRecord::Base |
637 | 637 | domain |
638 | 638 | end |
639 | 639 | |
640 | + def admin_url | |
641 | + { :controller => 'admin_panel', :action => 'index' } | |
642 | + end | |
643 | + | |
640 | 644 | def top_url |
641 | 645 | url = 'http://' |
642 | 646 | url << (Noosfero.url_options.key?(:host) ? Noosfero.url_options[:host] : default_hostname) | ... | ... |
app/views/account/accept_terms.html.erb
... | ... | @@ -19,10 +19,18 @@ |
19 | 19 | <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %> |
20 | 20 | <%= hidden_field_tag :answer, params[:answer] %> |
21 | 21 | |
22 | - <%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I read the terms of use and accepted them') : environment.terms_of_use_acceptance_text, :terms_accepted, '1', false, :onclick => 'toggle_submit_button("submit-accept-terms", this.checked)') %> | |
22 | + <%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I read the terms of use and accepted them') : environment.terms_of_use_acceptance_text, :terms_accepted, '1', false, :id => 'accept-terms') %> | |
23 | 23 | <% button_bar do %> |
24 | 24 | <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %> |
25 | 25 | <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %> |
26 | 26 | <% end %> |
27 | 27 | <% end %> |
28 | 28 | </div> |
29 | + | |
30 | +<script type="text/javascript"> | |
31 | + jQuery('#accept-terms').change(function(){ | |
32 | + jQuery("#submit-accept-terms").toggleClass("disabled"); | |
33 | + jQuery("#submit-accept-terms").prop("disabled", !jQuery("#submit-accept-terms").prop("disabled")); | |
34 | + }); | |
35 | +</script> | |
36 | + | ... | ... |
app/views/blocks/login_block.html.erb
1 | -<div class="logged-user-info" style='display: none;'> | |
2 | - <h2><%= _('Logged in as %s') % '{login}' %></h2> | |
3 | - <ul> | |
4 | - <li><%= _('User since {year}/{month}') %></li> | |
5 | - <li><%= link_to _('Homepage'), '/{login}' %></li> | |
6 | - </ul> | |
7 | - <div class="user-actions"> | |
8 | - <%= link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout' }, :class => 'button with-text icon-menu-logout' %> | |
1 | +<% if user.present? %> | |
2 | + <div class="logged-user-info"> | |
3 | + <h2><%= _('Logged in as %s') % user.identifier %></h2> | |
4 | + <ul> | |
5 | + <li><%= _('User since %s/%s') % [user.created_at.month, user.created_at.year] %></li> | |
6 | + <li><%= link_to _('Homepage'), user.public_profile_url %></li> | |
7 | + </ul> | |
8 | + <div class="user-actions"> | |
9 | + <%= link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout' }, :class => 'button with-text icon-menu-logout' %> | |
10 | + </div> | |
9 | 11 | </div> |
10 | -</div> | |
11 | -<div class='not-logged-user' style='display: none;'> | |
12 | - <%= render :file => 'account/login_block' %> | |
13 | -</div> | |
12 | +<% else %> | |
13 | + <div class='not-logged-user'> | |
14 | + <%= render :file => 'account/login_block' %> | |
15 | + </div> | |
16 | +<% end%> | ... | ... |
app/views/layouts/_user.html.erb
1 | 1 | <div id="user"> |
2 | - <span class='logged-in' style='display: none;'> | |
3 | - <%= usermenu_logged_in %> | |
4 | - </span> | |
5 | - <span class='not-logged-in' style='display: none'> | |
2 | + <% user = (session[:user] && User.find_by_id(session[:user])) || nil %> | |
3 | + <% if user.present? %> | |
4 | + <% user = user.person %> | |
5 | + <span class='logged-in'> | |
6 | + <%= usermenu_logged_in %> | |
7 | + </span> | |
8 | + <% else %> | |
9 | + <span class='not-logged-in'> | |
10 | + <%= _("<span class='login'>%s</span>") % thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login') %> | |
11 | + <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_exec(&content) }.join("") %> | |
6 | 12 | |
7 | - <%= _("<span class='login'>%s</span>") % thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login') %> | |
8 | - <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_exec(&content) }.join("") %> | |
13 | + <div id='inlineLoginBox' style='display: none;'> | |
14 | + <%= render :file => 'account/login', :locals => { :is_thickbox => true } %> | |
15 | + </div> | |
9 | 16 | |
10 | - <div id='inlineLoginBox' style='display: none;'> | |
11 | - <%= render :file => 'account/login', :locals => { :is_thickbox => true } %> | |
12 | - </div> | |
13 | - | |
14 | - <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> | |
15 | - <%= _("<span class='or'>or</span> <span class='signup'>%s</span>") % link_to('<strong>' + _('Sign up') + '</strong>', :controller => 'account', :action => 'signup')%> | |
16 | - <% end %> | |
17 | - | |
18 | - </span> | |
17 | + <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> | |
18 | + <%= _("<span class='or'>or</span> <span class='signup'>%s</span>") % link_to('<strong>' + _('Sign up') + '</strong>', :controller => 'account', :action => 'signup')%> | |
19 | + <% end %> | |
20 | + </span> | |
21 | + <% end %> | |
19 | 22 | <form action="/search" id="top-search" class="search_form clean" method="get"> |
20 | 23 | <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> |
21 | 24 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> | ... | ... |
app/views/profile_editor/edit.html.erb
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | |
54 | 54 | <%= |
55 | 55 | @plugins.dispatch(:profile_editor_extras).map do |content| |
56 | - if content.respond_to?(:call) then instance_eval(&content).html_safe else content.html_safe end | |
56 | + content.kind_of?(Proc) ? self.instance_exec(&content) : content | |
57 | 57 | end.join("\n") |
58 | 58 | %> |
59 | 59 | ... | ... |
features/admin_categories.feature
... | ... | @@ -40,11 +40,11 @@ Feature: manage categories |
40 | 40 | Scenario: admin user could hide the category tree |
41 | 41 | Given I follow "Administration" |
42 | 42 | And I follow "Categories" |
43 | - When I follow "Show" and wait while it hides | |
43 | + When I follow "Show" | |
44 | 44 | Then I should see "Vegetarian" |
45 | 45 | And I should see "Steak" |
46 | - When I follow "Hide" and wait while it hides | |
47 | - Then "Vegetarian" should not be visible within "div" | |
46 | + When I follow "Hide" | |
47 | + Then I should not see "Vegetarian" | |
48 | 48 | And "Steak" should not be visible within "div" |
49 | 49 | |
50 | 50 | @selenium |
... | ... | @@ -52,7 +52,6 @@ Feature: manage categories |
52 | 52 | Given the following category |
53 | 53 | | parent | name | display_in_menu | |
54 | 54 | | Steak | Pig | true | |
55 | - And I am on the homepage | |
56 | 55 | When I follow "Administration" |
57 | 56 | And I follow "Categories" |
58 | 57 | Then I should see "Food Show" | ... | ... |
features/edit_image.feature
... | ... | @@ -19,8 +19,8 @@ Feature: edit_image |
19 | 19 | Scenario: dont offer to edit external link if no image |
20 | 20 | Given the following files |
21 | 21 | | owner | file | mime | |
22 | - | morgoth | test.txt | text/plain | | |
23 | - When I go to edit "test.txt" by morgoth | |
22 | + | morgoth | test_another.txt | text/plain | | |
23 | + When I go to edit "test_another.txt" by morgoth | |
24 | 24 | Then I should not see "External link" |
25 | 25 | |
26 | 26 | Scenario: display tag list field when editing file | ... | ... |
features/edit_profile.feature
... | ... | @@ -12,9 +12,7 @@ Feature: edit profile |
12 | 12 | | birth_date | |
13 | 13 | When I go to joao's control panel |
14 | 14 | And I follow "Edit Profile" |
15 | - And I select "November" from "profile_data_birth_date_2i" | |
16 | - And I select "15" from "profile_data_birth_date_3i" | |
17 | - And I select "1980" from "profile_data_birth_date_1i" | |
15 | + And I select "1980-11-15" from "profile_data_birth_date" | |
18 | 16 | And I press "Save" |
19 | 17 | Then I should not see "Birth date is invalid" |
20 | 18 | And I should not see "Birth date is mandatory" |
... | ... | @@ -25,9 +23,7 @@ Feature: edit profile |
25 | 23 | | birth_date | |
26 | 24 | When I go to joao's control panel |
27 | 25 | And I follow "Edit Profile" |
28 | - And I select "November" from "profile_data_birth_date_2i" | |
29 | - And I select "15" from "profile_data_birth_date_3i" | |
30 | - And I select "1980" from "profile_data_birth_date_1i" | |
26 | + And I select "1980-11-15" from "profile_data_birth_date" | |
31 | 27 | And I press "Save" |
32 | 28 | Then I should not see "Birth date is invalid" |
33 | 29 | And I should not see "Birth date is mandatory" | ... | ... |
features/forum.feature
... | ... | @@ -165,7 +165,7 @@ Feature: forum |
165 | 165 | | article | author | title | body | |
166 | 166 | | Post one | joaosilva | Hi all | Hi all | |
167 | 167 | When I go to /joaosilva/forum |
168 | - Then I should see "Joao" linking to "http://localhost/joaosilva/" | |
168 | + Then I should see "Joao Silva" within ".forum-post-last-answer" | |
169 | 169 | |
170 | 170 | @selenium |
171 | 171 | Scenario: community member should be able to see the discussion topic button | ... | ... |
features/plugins.feature
... | ... | @@ -13,46 +13,39 @@ Feature: plugins |
13 | 13 | | login | name | |
14 | 14 | | joaosilva | Joao Silva | |
15 | 15 | And I am logged in as "joaosilva" |
16 | - And the following plugin | |
17 | - | klass | | |
18 | - | TestPlugin | | |
19 | - And the following events of TestPlugin | |
20 | - | event | body | | |
21 | - | control_panel_buttons | proc { {:title => 'Test plugin button', :icon => '', :url => ''} } | | |
22 | - | profile_tabs | proc { {:title => 'Test plugin tab', :id => 'test_plugin', :content => proc {'Test plugin random content'} } } | | |
23 | 16 | |
24 | 17 | Scenario: a user must see the plugin\'s button in the control panel if the plugin is enabled |
25 | - Given plugin Test is enabled on environment | |
18 | + Given plugin Foo is enabled on environment | |
26 | 19 | And I go to joaosilva's control panel |
27 | - Then I should see "Test plugin button" | |
20 | + Then I should see "Foo plugin button" | |
28 | 21 | |
29 | 22 | Scenario: a user must see the plugin\'s tab in in the profile if the plugin is enabled |
30 | - Given plugin Test is enabled on environment | |
23 | + Given plugin Foo is enabled on environment | |
31 | 24 | And I am on joaosilva's profile |
32 | - Then I should see "Test plugin tab" | |
25 | + Then I should see "Foo plugin tab" | |
33 | 26 | |
34 | 27 | Scenario: a user must not see the plugin\'s button in the control panel if the plugin is disabled |
35 | - Given plugin Test is disabled on environment | |
28 | + Given plugin Foo is disabled on environment | |
36 | 29 | And I go to joaosilva's control panel |
37 | - Then I should not see "Test plugin button" | |
30 | + Then I should not see "Foo plugin button" | |
38 | 31 | |
39 | 32 | Scenario: a user must not see the plugin\'s tab in in the profile if the plugin is disabled |
40 | - Given plugin Test is disabled on environment | |
33 | + Given plugin Foo is disabled on environment | |
41 | 34 | And I am on joaosilva's profile |
42 | - Then I should not see "Test plugin tab" | |
35 | + Then I should not see "Foo plugin tab" | |
43 | 36 | |
44 | 37 | Scenario: an admin should be able to deactivate a plugin |
45 | - Given plugin Test is enabled on environment | |
38 | + Given plugin Foo is enabled on environment | |
46 | 39 | And I am logged in as admin |
47 | 40 | When I go to admin_user's control panel |
48 | - Then I should see "Test plugin button" | |
41 | + Then I should see "Foo plugin button" | |
49 | 42 | When I go to admin_user's profile |
50 | - Then I should see "Test plugin tab" | |
43 | + Then I should see "Foo plugin tab" | |
51 | 44 | And I go to the environment control panel |
52 | 45 | And I follow "Plugins" |
53 | - And I uncheck "Test plugin" | |
46 | + And I uncheck "Foo" | |
54 | 47 | And I press "Save changes" |
55 | 48 | When I go to admin_user's control panel |
56 | - Then I should not see "Test plugin button" | |
49 | + Then I should not see "Foo plugin button" | |
57 | 50 | When I go to admin_user's profile |
58 | - Then I should not see "Test plugin tab" | |
51 | + Then I should not see "Foo plugin tab" | ... | ... |
features/profile_domain.feature
... | ... | @@ -55,7 +55,7 @@ Feature: domain for profile |
55 | 55 | Scenario: access community by domain |
56 | 56 | Given I go to the search communities page |
57 | 57 | When I follow "Sample Community" within ".search-profile-item" |
58 | - Then the page title should be "Sample Community - Colivre.net" | |
58 | + Then the page title should be "Sample Community" | |
59 | 59 | |
60 | 60 | # This test is not working because the community domain isn't at all different |
61 | 61 | # from the environment (localhost / 127.0.0.1) | ... | ... |
features/suggest_article.feature
... | ... | @@ -12,6 +12,7 @@ Feature: suggest article |
12 | 12 | | sample-community | Sample Community | |
13 | 13 | And "Joao Silva" is admin of "Sample Community" |
14 | 14 | |
15 | + @selenium | |
15 | 16 | Scenario: highlight an article before approval of a suggested article |
16 | 17 | Given someone suggested the following article to be published |
17 | 18 | | target | article_name | article_body | name | email | |
... | ... | @@ -19,6 +20,7 @@ Feature: suggest article |
19 | 20 | When I am logged in as "joaosilva" |
20 | 21 | And I go to sample-community's control panel |
21 | 22 | And I follow "Process requests" |
23 | + And I choose "Accept" | |
22 | 24 | And I should see "suggested the publication of the article" |
23 | 25 | Then I should see "Highlight this article" within ".task_box" |
24 | 26 | ... | ... |
features/support/selenium.rb
plugins/foo/lib/foo_plugin.rb
... | ... | @@ -8,4 +8,12 @@ class FooPlugin < Noosfero::Plugin |
8 | 8 | _("A sample plugin to test autoload craziness.") |
9 | 9 | end |
10 | 10 | |
11 | + def control_panel_buttons | |
12 | + {:title => 'Foo plugin button', :icon => '', :url => ''} | |
13 | + end | |
14 | + | |
15 | + def profile_tabs | |
16 | + {:title => 'Foo plugin tab', :id => 'foo_plugin', :content => lambda {'Foo plugin random content'} } | |
17 | + end | |
18 | + | |
11 | 19 | end | ... | ... |
public/javascripts/application.js
... | ... | @@ -518,16 +518,11 @@ jQuery(function($) { |
518 | 518 | $.getJSON('/account/user_data', function userDataCallBack(data) { |
519 | 519 | if (data.login) { |
520 | 520 | // logged in |
521 | - loggedInDataCallBack(data); | |
522 | - addManageEnterprisesToOldStyleMenu(data); | |
523 | 521 | if (data.chat_enabled) { |
524 | 522 | setInterval(function(){ $.getJSON('/account/user_data', chatOnlineUsersDataCallBack)}, 10000); |
525 | 523 | } |
526 | 524 | $('head').append('<meta content="authenticity_token" name="csrf-param" />'); |
527 | 525 | $('head').append('<meta content="'+$.cookie("_noosfero_.XSRF-TOKEN")+'" name="csrf-token" />'); |
528 | - } else { | |
529 | - // not logged in | |
530 | - $('#user .not-logged-in, .login-block .not-logged-user').fadeIn(); | |
531 | 526 | } |
532 | 527 | if (data.notice) { |
533 | 528 | display_notice(data.notice); |
... | ... | @@ -536,45 +531,6 @@ jQuery(function($) { |
536 | 531 | $(window).trigger("userDataLoaded", data); |
537 | 532 | }); |
538 | 533 | |
539 | - function loggedInDataCallBack(data) { | |
540 | - // logged in | |
541 | - $('body').addClass('logged-in'); | |
542 | - $('#user .logged-in, .login-block .logged-user-info').each(function() { | |
543 | - $(this).find('a[href]').each(function() { | |
544 | - var new_href = $(this).attr('href').replace('{login}', data.login); | |
545 | - if (data.email_domain) { | |
546 | - new_href = new_href.replace('{email_domain}', data.email_domain); | |
547 | - } | |
548 | - $(this).attr('href', new_href); | |
549 | - }); | |
550 | - var html = $(this).html() | |
551 | - .replace(/{login}/g, data.login) | |
552 | - .replace('{avatar}', data.avatar) | |
553 | - .replace('{month}', data.since_month) | |
554 | - .replace('{year}', data.since_year); | |
555 | - $(this).html(html).fadeIn(); | |
556 | - if (data.is_admin) { | |
557 | - $('#user .admin-link').show(); | |
558 | - } | |
559 | - if (data.email_domain) { | |
560 | - $('#user .webmail-link').show(); | |
561 | - } | |
562 | - }); | |
563 | - } | |
564 | - | |
565 | - function addManageEnterprisesToOldStyleMenu(data) { | |
566 | - if ($('#manage-enterprises-link-template').length > 0) { | |
567 | - $.each(data.enterprises, function(index, enterprise) { | |
568 | - var item = $('<li>' + $('#manage-enterprises-link-template').html() + '</li>'); | |
569 | - item.find('a[href]').each(function() { | |
570 | - $(this).attr('href', '/myprofile/' + enterprise.identifier); | |
571 | - }); | |
572 | - item.html(item.html().replace('{name}', enterprise.name)); | |
573 | - item.insertAfter('#manage-enterprises-link-template'); | |
574 | - }); | |
575 | - } | |
576 | - } | |
577 | - | |
578 | 534 | function chatOnlineUsersDataCallBack(data) { |
579 | 535 | if ($('#chat-online-users').length == 0) { |
580 | 536 | return; | ... | ... |
test/functional/profile_controller_test.rb
... | ... | @@ -154,7 +154,7 @@ class ProfileControllerTest < ActionController::TestCase |
154 | 154 | community = Community.create!(:name => 'my test community') |
155 | 155 | community.add_admin(@profile) |
156 | 156 | get :index, :profile => community.identifier |
157 | - assert_tag :tag => 'a', :attributes => { :href => /\/myprofile\/\{login\}/ }, :content => 'Control panel' | |
157 | + assert_tag :tag => 'a', :attributes => { :href => /\/myprofile\/my-test-community/ }, :content => 'Control panel' | |
158 | 158 | end |
159 | 159 | |
160 | 160 | should 'show create community in own profile' do | ... | ... |
test/integration/manage_documents_test.rb
... | ... | @@ -9,7 +9,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
9 | 9 | user.activate |
10 | 10 | |
11 | 11 | login('myuser', 'myuser') |
12 | - assert_tag :tag => 'a', :attributes => { :href => "#{user.environment.top_url}/myprofile\/{login}" } | |
12 | + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{user.login}" } | |
13 | 13 | |
14 | 14 | get '/myprofile/myuser' |
15 | 15 | assert_response :success |
... | ... | @@ -40,7 +40,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
40 | 40 | article.save! |
41 | 41 | |
42 | 42 | login('myuser', 'myuser') |
43 | - assert_tag :tag => 'a', :attributes => { :href => "#{profile.environment.top_url}\/myprofile\/{login}" } | |
43 | + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{profile.identifier}" } | |
44 | 44 | |
45 | 45 | get '/myprofile/myuser' |
46 | 46 | assert_response :success |
... | ... | @@ -75,7 +75,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest |
75 | 75 | |
76 | 76 | login('myuser', 'myuser') |
77 | 77 | |
78 | - assert_tag :tag => 'a', :attributes => { :href => "#{profile.environment.top_url}\/myprofile\/{login}" } | |
78 | + assert_tag :tag => 'a', :attributes => { :href => "/myprofile/#{profile.identifier}" } | |
79 | 79 | get '/myprofile/myuser' |
80 | 80 | assert_response :success |
81 | 81 | ... | ... |