diff options
-rw-r--r-- | app/views/taglibs/cards.dryml | 4 | ||||
-rw-r--r-- | features/question_listing.feature | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/app/views/taglibs/cards.dryml b/app/views/taglibs/cards.dryml index 16f96f4..6b144aa 100644 --- a/app/views/taglibs/cards.dryml +++ b/app/views/taglibs/cards.dryml @@ -2,8 +2,8 @@ <card class="question" param="default" merge> <header: param> <h4 param="heading"><a><name/></a></h4> - <if with="&this.answered?(user || current_user)"> - answered + <if test="&this.answered?(user || current_user)"> + answered (<a with="&this.answer_of(user || current_user)">view answer</a>) </if> </header:> </card> diff --git a/features/question_listing.feature b/features/question_listing.feature index 0e1c02b..42e7129 100644 --- a/features/question_listing.feature +++ b/features/question_listing.feature @@ -43,3 +43,19 @@ Feature: Viewing question listings Then I should see "q3" And I should not see following: |q1|q2| + + + Scenario: On user page show links to answers + Given I am logged in as "recruiter" who is "recruiter" + And following questions: + |q1|cat1| + |q2|cat1| + And user "recruit" has category "cat1" + And answer of "recruit" for question "q1" + + When I am on show "recruit" user page + And I follow "Questions user should answer" + And I follow "view answer" + + Then I should be on answer of "recruit" for question "q1" page + |