Fix new rubocop warnings

This commit is contained in:
Tom Hughes 2021-01-11 19:14:00 +00:00
parent 52d40ee42b
commit 0654be27f9
16 changed files with 67 additions and 63 deletions

View file

@ -105,7 +105,7 @@ module Api
assert_equal "The parameter bbox is required, and must be of the form min_lon,min_lat,max_lon,max_lat", @response.body, "A bbox param was expected"
end
def test_traces_page_less_than_0
def test_traces_page_less_than_zero
-10.upto(-1) do |i|
get trackpoints_path(:page => i, :bbox => "-0.1,-0.1,0.1,0.1")
assert_response :bad_request

View file

@ -479,7 +479,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
assert_select "li.search_results_entry", results.count
results.each do |result|
attrs = result.collect { |k, v| "[data-#{k}='#{v}']" }.join("")
attrs = result.collect { |k, v| "[data-#{k}='#{v}']" }.join
assert_select "li.search_results_entry a.set_position#{attrs}", result[:name]
end
end

View file

@ -761,7 +761,9 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
assert_response :success
assert_template "index"
if !traces.empty?
if traces.empty?
assert_select "h4", /Nothing here yet/
else
assert_select "table#trace_list tbody", :count => 1 do
assert_select "tr", :count => traces.length do |rows|
traces.zip(rows).each do |trace, row|
@ -772,8 +774,6 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
end
end
end
else
assert_select "h4", /Nothing here yet/
end
end

View file

@ -1,4 +1,3 @@
FactoryBot.define do
factory :diary_entry_subscription do
end
factory :diary_entry_subscription
end