diff --git a/app/models/todos/undone_todos_query.rb b/app/models/todos/undone_todos_query.rb index b4980870..c6d107ab 100644 --- a/app/models/todos/undone_todos_query.rb +++ b/app/models/todos/undone_todos_query.rb @@ -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 diff --git a/test/integration/feed_smoke_test.rb b/test/integration/feed_smoke_test.rb index 6eb762bd..d172cdbd 100644 --- a/test/integration/feed_smoke_test.rb +++ b/test/integration/feed_smoke_test.rb @@ -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