mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: link to user account in last votes by tu listing
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
ab1479925b
commit
987f9eab3b
2 changed files with 7 additions and 1 deletions
|
@ -18,7 +18,11 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for vote in votes %}
|
{% for vote in votes %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ vote.Username }}</td>
|
<td>
|
||||||
|
<a href="/account/{{ vote.Username }}">
|
||||||
|
{{ vote.Username }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="/tu/{{ vote.LastVote }}">
|
<a href="/tu/{{ vote.LastVote }}">
|
||||||
{{ vote.LastVote }}
|
{{ vote.LastVote }}
|
||||||
|
|
|
@ -251,6 +251,7 @@ def test_tu_index(client, tu_user):
|
||||||
|
|
||||||
# Check to see the rows match up to our user and related vote.
|
# Check to see the rows match up to our user and related vote.
|
||||||
username, vote_id = rows[0]
|
username, vote_id = rows[0]
|
||||||
|
username = username.xpath("./a")[0]
|
||||||
vote_id = vote_id.xpath("./a")[0]
|
vote_id = vote_id.xpath("./a")[0]
|
||||||
assert username.text.strip() == tu_user.Username
|
assert username.text.strip() == tu_user.Username
|
||||||
assert int(vote_id.text.strip()) == vote_records[1].ID
|
assert int(vote_id.text.strip()) == vote_records[1].ID
|
||||||
|
@ -464,6 +465,7 @@ def test_tu_index_last_votes(client, tu_user, user):
|
||||||
|
|
||||||
last_vote = rows[0]
|
last_vote = rows[0]
|
||||||
user, vote_id = last_vote.xpath("./td")
|
user, vote_id = last_vote.xpath("./td")
|
||||||
|
user = user.xpath("./a")[0]
|
||||||
vote_id = vote_id.xpath("./a")[0]
|
vote_id = vote_id.xpath("./a")[0]
|
||||||
|
|
||||||
assert user.text.strip() == tu_user.Username
|
assert user.text.strip() == tu_user.Username
|
||||||
|
|
Loading…
Add table
Reference in a new issue