Skip to content

Commit

Permalink
Fix Style/StringConcatenation rubocop offense in test/test_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
krauselukas committed Apr 17, 2023
1 parent 7c9f401 commit d8e2c11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/api/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ Style/StringConcatenation:
- 'test/functional/zzz_post_consistency_test.rb'
- 'test/integration/last_events_test.rb'
- 'test/test_consistency_helper.rb'
- 'test/test_helper.rb'
- 'test/unit/attrib_test.rb'
- 'test/unit/attribute_test.rb'
- 'test/unit/binary_release.rb'
Expand Down
5 changes: 3 additions & 2 deletions src/api/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def login_king(opts = {})

teardown do
dirpath = Rails.root.join('tmp', 'capybara')
htmlpath = dirpath.join(name + '.html')
htmlpath = dirpath.join("#{name}.html")
if !passed?
Dir.mkdir(dirpath) unless Dir.exist?(dirpath)
save_page(htmlpath)
Expand Down Expand Up @@ -254,7 +254,8 @@ def basic_auth
end

def prepare_request_with_user(user, passwd)
@@auth = 'Basic ' + Base64.encode64(user + ':' + passwd)
basic_auth_credentials = "#{user}:#{passwd}"
@@auth = "Basic #{Base64.encode64(basic_auth_credentials)}"
end

# will provide a user without special permissions
Expand Down

0 comments on commit d8e2c11

Please sign in to comment.