diff --git a/Gemfile b/Gemfile index 5fa745ba..8052f6bb 100644 --- a/Gemfile +++ b/Gemfile @@ -62,7 +62,7 @@ end group :development, :test do gem 'byebug' gem 'listen' - gem "rubocop", "~> 0.65", require: false + gem "rubocop", "~> 0.69", require: false end group :test do @@ -76,7 +76,7 @@ group :test do gem "mocha", :require => false gem "minitest-stub-const" - gem "selenium-webdriver", "~> 2.53" + gem "selenium-webdriver", "~> 3.142" # uncomment to use the webkit option. This depends on Qt being installed # gem "capybara-webkit" diff --git a/Gemfile.lock b/Gemfile.lock index 4b77e528..321710dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,8 +68,8 @@ GEM byebug (11.0.1) chartjs-ror (3.6.4) rails (>= 3.1) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (1.0.1) + rake (< 13.0) climate_control (0.2.0) codeclimate-test-reporter (1.0.7) simplecov @@ -144,11 +144,9 @@ GEM mime-types mimemagic (~> 0.3.0) terrapin (~> 0.6.0) - parallel (1.13.0) - parser (2.6.0.0) + parallel (1.17.0) + parser (2.6.3.0) ast (~> 2.4.0) - powerpack (0.1.2) - psych (3.1.0) puma (3.12.1) rack (2.0.7) rack-mini-profiler (1.0.2) @@ -195,15 +193,13 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.65.0) + rubocop (0.69.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) - psych (>= 3.1.0) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.4.0) + unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.0) ruby_dep (1.5.0) rubyzip (1.2.2) @@ -226,10 +222,9 @@ GEM sassc (2.0.0) ffi (~> 1.9.6) rake - selenium-webdriver (2.53.4) - childprocess (~> 0.5) - rubyzip (~> 1.0) - websocket (~> 1.0) + selenium-webdriver (3.142.3) + childprocess (>= 0.5, < 2.0) + rubyzip (~> 1.2, >= 1.2.2) simplecov (0.16.1) docile (~> 1.1) json (>= 1.8, < 3) @@ -261,9 +256,8 @@ GEM thread_safe (~> 0.1) uglifier (4.1.20) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.1) + unicode-display_width (1.6.0) uniform_notifier (1.12.1) - websocket (1.2.8) websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) @@ -304,10 +298,10 @@ DEPENDENCIES rails-dom-testing (~> 2.0.0) rails_autolink rspec-expectations - rubocop (~> 0.65) + rubocop (~> 0.69) sanitize (~> 5.0) sass-rails (~> 5.0) - selenium-webdriver (~> 2.53) + selenium-webdriver (~> 3.142) simplecov spring sqlite3 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