mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-07 17:58:50 +01:00
Merge pull request #2233 from ZeiP/bug/1929_broken_feed_missing_tag
#1929: Fix the actions query breaking when querying actions with a no…
This commit is contained in:
commit
5962fe808b
2 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ module Todos
|
|||
|
||||
if params[:tag]
|
||||
tag = Tag.where(:name => params[:tag]).first
|
||||
return [] if !tag
|
||||
not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,10 @@ class FeedSmokeTest < ActionDispatch::IntegrationTest
|
|||
assert_success "/todos.rss?token=#{ users(:admin_user).token }&done=7"
|
||||
end
|
||||
|
||||
def test_all_starred_active_actions_rss
|
||||
assert_success "/todos.rss?token=#{ users(:admin_user).token }&tag=starred"
|
||||
end
|
||||
|
||||
def test_all_actions_completed_in_last_7_days_txt
|
||||
assert_success "/todos.txt?token=#{ users(:admin_user).token }&done=7"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue