From 4983bc747cf933aaaac93624dabfd4ab3aa028de Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Fri, 22 Oct 2010 19:25:49 -0300 Subject: [PATCH] Back button on events links to profile's homepage --- app/views/events/events.rhtml | 2 +- features/events.feature | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/events/events.rhtml b/app/views/events/events.rhtml index 6c59776..ffeb6e7 100644 --- a/app/views/events/events.rhtml +++ b/app/views/events/events.rhtml @@ -1,6 +1,6 @@

- <%= button :back, _('Back to %s') % profile.name, profile.public_profile_url %> + <%= button :back, _('Back to %s') % profile.name, profile.url %> <% if user && user.has_permission?('post_content', profile) %> <%= button :new, _('New event'), myprofile_url(:controller => 'cms', :action => 'new', :type => 'Event') %> <% end %> diff --git a/features/events.feature b/features/events.feature index cc3636c..41a2897 100644 --- a/features/events.feature +++ b/features/events.feature @@ -142,9 +142,10 @@ Feature: events When I follow "31" Then I should see "YAPC::Brasil 2010" - Scenario: provide button to back from profile - When I am on /profile/josesilva/events - Then I should see "Back to josesilva" link + Scenario: provide button to go back to profile homepage + Given I am on /profile/josesilva/events + When I follow "Back to josesilva" + Then I should be on josesilva's homepage Scenario: warn when there is no events When I am on /profile/josesilva/events/2020/12/1 -- libgit2 0.21.2