1 |
commit: e6a17027c55ab3ded54b282685aab264318c7c7e |
2 |
Author: Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 23 17:51:52 2011 +0000 |
4 |
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 23 18:00:56 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/recruiting-webapp.git;a=commit;h=e6a17027 |
7 |
|
8 |
Show links to answers on user questions listing |
9 |
|
10 |
Fix bug: |
11 |
|
12 |
https://bugs.gentoo.org/show_bug.cgi?id=355721 |
13 |
|
14 |
--- |
15 |
app/views/taglibs/cards.dryml | 4 ++-- |
16 |
features/question_listing.feature | 16 ++++++++++++++++ |
17 |
2 files changed, 18 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/app/views/taglibs/cards.dryml b/app/views/taglibs/cards.dryml |
20 |
index 16f96f4..6b144aa 100644 |
21 |
--- a/app/views/taglibs/cards.dryml |
22 |
+++ b/app/views/taglibs/cards.dryml |
23 |
@@ -2,8 +2,8 @@ |
24 |
<card class="question" param="default" merge> |
25 |
<header: param> |
26 |
<h4 param="heading"><a><name/></a></h4> |
27 |
- <if with="&this.answered?(user || current_user)"> |
28 |
- answered |
29 |
+ <if test="&this.answered?(user || current_user)"> |
30 |
+ answered (<a with="&this.answer_of(user || current_user)">view answer</a>) |
31 |
</if> |
32 |
</header:> |
33 |
</card> |
34 |
|
35 |
diff --git a/features/question_listing.feature b/features/question_listing.feature |
36 |
index 0e1c02b..42e7129 100644 |
37 |
--- a/features/question_listing.feature |
38 |
+++ b/features/question_listing.feature |
39 |
@@ -43,3 +43,19 @@ Feature: Viewing question listings |
40 |
Then I should see "q3" |
41 |
And I should not see following: |
42 |
|q1|q2| |
43 |
+ |
44 |
+ |
45 |
+ Scenario: On user page show links to answers |
46 |
+ Given I am logged in as "recruiter" who is "recruiter" |
47 |
+ And following questions: |
48 |
+ |q1|cat1| |
49 |
+ |q2|cat1| |
50 |
+ And user "recruit" has category "cat1" |
51 |
+ And answer of "recruit" for question "q1" |
52 |
+ |
53 |
+ When I am on show "recruit" user page |
54 |
+ And I follow "Questions user should answer" |
55 |
+ And I follow "view answer" |
56 |
+ |
57 |
+ Then I should be on answer of "recruit" for question "q1" page |
58 |
+ |