diff options
-rw-r--r-- | app/views/users/show.dryml | 2 | ||||
-rw-r--r-- | features/clean_ui.feature | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/views/users/show.dryml b/app/views/users/show.dryml index b7bd5fe..f91b0f1 100644 --- a/app/views/users/show.dryml +++ b/app/views/users/show.dryml @@ -15,7 +15,7 @@ <actions:><submit label="This recruit needs your acceptance"/></actions:> </form> - <if test="&this.editable_by?(current_user, :mentor)"> + <if test="&this.editable_by?(current_user, :mentor) and this.role.is_recruit?"> <form if="&this.mentor.nil?"> <input value="¤t_user.id" type="hidden" name="user[mentor_id]"/> <submit label="Start mentoring this recruit"/> diff --git a/features/clean_ui.feature b/features/clean_ui.feature index fd11103..053b5b1 100644 --- a/features/clean_ui.feature +++ b/features/clean_ui.feature @@ -125,3 +125,10 @@ Feature: Clean UI Given I am logged in as "mentor" who is "mentor" And user "mentor2" is mentor of "recruit" Then I should see explanation that I can't become mentor for "recruit" + + + Scenario: Don't show "recruit this recruit" button on non-recruit pages + Given I am logged in as "recruiter" who is "recruiter" + And user "recruiter2" who is "recruiter" + When I am on show "recruiter2" user page + Then I should not see tag <input class="button submit-button" type="submit" value="Start mentoring this recruit"> |