diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 39152e6..c1363c5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -108,6 +108,7 @@ Style/ClassVars: Exclude: - 'test/emails_test.rb' - 'test/files_test.rb' + - 'test/previews_test.rb' - 'test/mailer.rb' # Offense count: 28 diff --git a/lib/Mailosaur/models/preview_request.rb b/lib/Mailosaur/models/preview_request.rb index 662bbd0..5542339 100644 --- a/lib/Mailosaur/models/preview_request.rb +++ b/lib/Mailosaur/models/preview_request.rb @@ -1,7 +1,7 @@ module Mailosaur module Models class PreviewRequest < BaseModel - def initialize(email_client, disable_images = false) + def initialize(email_client, disable_images: false) @email_client = email_client @disable_images = disable_images end diff --git a/test/previews_test.rb b/test/previews_test.rb index f178b98..fdad690 100644 --- a/test/previews_test.rb +++ b/test/previews_test.rb @@ -44,7 +44,7 @@ def startup result = @@client.messages.generate_previews(email.id, options) - assert_true(result.items.length > 0) + assert_false(result.items.empty) # Ensure we can download one of the generated preview file = @@client.files.get_preview(result.items[0].id)