rubocop -a
This commit is contained in:
@@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
# calculate how long a user needed for a form input, ussually we just
|
||||
def input_to_fast?
|
||||
fail 'session[:form_timestamp] not set' unless session[:form_timestamp]
|
||||
raise 'session[:form_timestamp] not set' unless session[:form_timestamp]
|
||||
duration = Time.now - session[:form_timestamp].to_time
|
||||
duration < INPUT_TIMEOUT
|
||||
end
|
||||
|
||||
@@ -8,8 +8,8 @@ class MailChimpBatchUpdate
|
||||
subscribers = []
|
||||
|
||||
Supporter.each_with_index do |supporter, index|
|
||||
subscribers.push(subscriber supporter)
|
||||
if index.modulo(20) == 0
|
||||
subscribers.push(subscriber(supporter))
|
||||
if index.modulo(20).zero?
|
||||
batch_subscribe(subscribers)
|
||||
subscribers = []
|
||||
end
|
||||
@@ -32,7 +32,8 @@ class MailChimpBatchUpdate
|
||||
'MEMBERSHIP' => supporter.li_membership.to_s,
|
||||
'AGE' => supporter.age_category,
|
||||
'LANG' => supporter.language,
|
||||
'ZIP' => supporter.zip } }
|
||||
'ZIP' => supporter.zip
|
||||
} }
|
||||
end
|
||||
|
||||
def update_unsubscibed
|
||||
|
||||
@@ -4,7 +4,7 @@ describe ApplicationHelper do
|
||||
describe '.title' do
|
||||
it 'sets content for :title' do
|
||||
helper.title 'test'
|
||||
expect(view.content_for :title).to eq 'test'
|
||||
expect(view.content_for(:title)).to eq 'test'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user