about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-21 19:54:36 -0500
committerGitHub <noreply@github.com>2023-02-22 09:54:36 +0900
commit0cfdd1a401f055c23e308a4b823bd250b1cbb3d3 (patch)
tree35cd9c386409bc9a1ca917bb6201b0ba1af37896 /spec
parent7ecf783dd3bfc07f80aab495273b6d01ba972c40 (diff)
Enable Rubocop Style/StringConcatenation defaults (#23792)
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/api/v1/apps_controller_spec.rb4
-rw-r--r--spec/controllers/api/v1/streaming_controller_spec.rb2
-rw-r--r--spec/validators/disallowed_hashtags_validator_spec.rb2
-rw-r--r--spec/workers/web/push_notification_worker_spec.rb2
4 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/api/v1/apps_controller_spec.rb b/spec/controllers/api/v1/apps_controller_spec.rb
index 9ac7880a4..61158e881 100644
--- a/spec/controllers/api/v1/apps_controller_spec.rb
+++ b/spec/controllers/api/v1/apps_controller_spec.rb
@@ -68,7 +68,7 @@ RSpec.describe Api::V1::AppsController, type: :controller do
     end
 
     context 'with a too-long website' do
-      let(:website) { 'https://foo.bar/' + ('hoge' * 2_000) }
+      let(:website) { "https://foo.bar/#{'hoge' * 2_000}" }
 
       it 'returns http unprocessable entity' do
         expect(response).to have_http_status(422)
@@ -76,7 +76,7 @@ RSpec.describe Api::V1::AppsController, type: :controller do
     end
 
     context 'with a too-long redirect_uris' do
-      let(:redirect_uris) { 'https://foo.bar/' + ('hoge' * 2_000) }
+      let(:redirect_uris) { "https://foo.bar/#{'hoge' * 2_000}" }
 
       it 'returns http unprocessable entity' do
         expect(response).to have_http_status(422)
diff --git a/spec/controllers/api/v1/streaming_controller_spec.rb b/spec/controllers/api/v1/streaming_controller_spec.rb
index 9dbca0178..7014ed9b2 100644
--- a/spec/controllers/api/v1/streaming_controller_spec.rb
+++ b/spec/controllers/api/v1/streaming_controller_spec.rb
@@ -25,7 +25,7 @@ describe Api::V1::StreamingController do
 
   context 'with streaming api on different host' do
     before(:each) do
-      Rails.configuration.x.streaming_api_base_url = 'wss://streaming-' + Rails.configuration.x.web_domain
+      Rails.configuration.x.streaming_api_base_url = "wss://streaming-#{Rails.configuration.x.web_domain}"
       @streaming_host = URI.parse(Rails.configuration.x.streaming_api_base_url).host
     end
 
diff --git a/spec/validators/disallowed_hashtags_validator_spec.rb b/spec/validators/disallowed_hashtags_validator_spec.rb
index 2c4ebc4f2..896fd4fc5 100644
--- a/spec/validators/disallowed_hashtags_validator_spec.rb
+++ b/spec/validators/disallowed_hashtags_validator_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe DisallowedHashtagsValidator, type: :validator do
       described_class.new.validate(status)
     end
 
-    let(:status) { double(errors: errors, local?: local, reblog?: reblog, text: disallowed_tags.map { |x| '#' + x }.join(' ')) }
+    let(:status) { double(errors: errors, local?: local, reblog?: reblog, text: disallowed_tags.map { |x| "##{x}" }.join(' ')) }
     let(:errors) { double(add: nil) }
 
     context 'for a remote reblog' do
diff --git a/spec/workers/web/push_notification_worker_spec.rb b/spec/workers/web/push_notification_worker_spec.rb
index 5bc24f888..822ef5257 100644
--- a/spec/workers/web/push_notification_worker_spec.rb
+++ b/spec/workers/web/push_notification_worker_spec.rb
@@ -37,7 +37,7 @@ describe Web::PushNotificationWorker do
       expect(a_request(:post, endpoint).with(headers: {
         'Content-Encoding' => 'aesgcm',
         'Content-Type' => 'application/octet-stream',
-        'Crypto-Key' => 'dh=BAgtUks5d90kFmxGevk9tH7GEmvz9DB0qcEMUsOBgKwMf-TMjsKIIG6LQvGcFAf6jcmAod15VVwmYwGIIxE4VWE;p256ecdsa=' + vapid_public_key.delete('='),
+        'Crypto-Key' => "dh=BAgtUks5d90kFmxGevk9tH7GEmvz9DB0qcEMUsOBgKwMf-TMjsKIIG6LQvGcFAf6jcmAod15VVwmYwGIIxE4VWE;p256ecdsa=#{vapid_public_key.delete('=')}",
         'Encryption' => 'salt=WJeVM-RY-F9351SVxTFx_g',
         'Ttl' => '172800',
         'Urgency' => 'normal',