about summary refs log tree commit diff
path: root/spec/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/accounts_helper_spec.rb2
-rw-r--r--spec/helpers/admin/action_logs_helper_spec.rb (renamed from spec/helpers/admin/action_log_helper_spec.rb)0
-rw-r--r--spec/helpers/admin/filter_helper_spec.rb2
-rw-r--r--spec/helpers/application_helper_spec.rb12
-rw-r--r--spec/helpers/home_helper_spec.rb2
-rw-r--r--spec/helpers/jsonld_helper_spec.rb12
-rw-r--r--spec/helpers/statuses_helper_spec.rb2
7 files changed, 21 insertions, 11 deletions
diff --git a/spec/helpers/accounts_helper_spec.rb b/spec/helpers/accounts_helper_spec.rb
index 1f412a39f..184b47dec 100644
--- a/spec/helpers/accounts_helper_spec.rb
+++ b/spec/helpers/accounts_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe AccountsHelper, type: :helper do
diff --git a/spec/helpers/admin/action_log_helper_spec.rb b/spec/helpers/admin/action_logs_helper_spec.rb
index 9d7ed4ab7..9d7ed4ab7 100644
--- a/spec/helpers/admin/action_log_helper_spec.rb
+++ b/spec/helpers/admin/action_logs_helper_spec.rb
diff --git a/spec/helpers/admin/filter_helper_spec.rb b/spec/helpers/admin/filter_helper_spec.rb
index 9d4ea2829..bbf90a996 100644
--- a/spec/helpers/admin/filter_helper_spec.rb
+++ b/spec/helpers/admin/filter_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 describe Admin::FilterHelper do
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 6502cfebf..2db2ee288 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 describe ApplicationHelper do
@@ -65,7 +67,7 @@ describe ApplicationHelper do
         expect(Setting).to receive(:registrations_mode).and_return('open')
       end
 
-      expect(helper.open_registrations?).to eq true
+      expect(helper.open_registrations?).to be true
     end
 
     it 'returns false when closed for registrations' do
@@ -73,7 +75,7 @@ describe ApplicationHelper do
         expect(Setting).to receive(:registrations_mode).and_return('none')
       end
 
-      expect(helper.open_registrations?).to eq false
+      expect(helper.open_registrations?).to be false
     end
   end
 
@@ -84,7 +86,7 @@ describe ApplicationHelper do
       end
 
       it 'does not show landing strip' do
-        expect(helper.show_landing_strip?).to eq false
+        expect(helper.show_landing_strip?).to be false
       end
     end
 
@@ -96,13 +98,13 @@ describe ApplicationHelper do
       it 'does not show landing strip on single user instance' do
         allow(helper).to receive(:single_user_mode?).and_return(true)
 
-        expect(helper.show_landing_strip?).to eq false
+        expect(helper.show_landing_strip?).to be false
       end
 
       it 'shows landing strip on multi user instance' do
         allow(helper).to receive(:single_user_mode?).and_return(false)
 
-        expect(helper.show_landing_strip?).to eq true
+        expect(helper.show_landing_strip?).to be true
       end
     end
   end
diff --git a/spec/helpers/home_helper_spec.rb b/spec/helpers/home_helper_spec.rb
index a3dc6f836..77db327c2 100644
--- a/spec/helpers/home_helper_spec.rb
+++ b/spec/helpers/home_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe HomeHelper, type: :helper do
diff --git a/spec/helpers/jsonld_helper_spec.rb b/spec/helpers/jsonld_helper_spec.rb
index debee17f0..ddd4bfe62 100644
--- a/spec/helpers/jsonld_helper_spec.rb
+++ b/spec/helpers/jsonld_helper_spec.rb
@@ -66,14 +66,14 @@ describe JsonLdHelper do
         stub_request(:get, 'https://mallory.test/').to_return body: '{"id": "https://marvin.test/"}'
         stub_request(:get, 'https://marvin.test/').to_return body: '{"id": "https://alice.test/"}'
 
-        expect(fetch_resource('https://mallory.test/', false)).to eq nil
+        expect(fetch_resource('https://mallory.test/', false)).to be_nil
       end
     end
 
     context 'when the second argument is true' do
       it 'returns nil if the retrieved ID and the given URI does not match' do
         stub_request(:get, 'https://mallory.test/').to_return body: '{"id": "https://alice.test/"}'
-        expect(fetch_resource('https://mallory.test/', true)).to eq nil
+        expect(fetch_resource('https://mallory.test/', true)).to be_nil
       end
     end
   end
@@ -81,7 +81,7 @@ describe JsonLdHelper do
   describe '#fetch_resource_without_id_validation' do
     it 'returns nil if the status code is not 200' do
       stub_request(:get, 'https://host.test/').to_return status: 400, body: '{}'
-      expect(fetch_resource_without_id_validation('https://host.test/')).to eq nil
+      expect(fetch_resource_without_id_validation('https://host.test/')).to be_nil
     end
 
     it 'returns hash' do
@@ -150,7 +150,7 @@ describe JsonLdHelper do
         patch_for_forwarding!(json, compacted)
         expect(compacted['to']).to eq ['https://www.w3.org/ns/activitystreams#Public']
         expect(compacted.dig('object', 'tag', 0, 'href')).to eq ['foo']
-        expect(safe_for_forwarding?(json, compacted)).to eq true
+        expect(safe_for_forwarding?(json, compacted)).to be true
       end
     end
 
@@ -160,14 +160,14 @@ describe JsonLdHelper do
         compacted = compact(json)
         deemed_compatible = patch_for_forwarding!(json, compacted)
         expect(compacted['to']).to eq ['https://www.w3.org/ns/activitystreams#Public']
-        expect(safe_for_forwarding?(json, compacted)).to eq true
+        expect(safe_for_forwarding?(json, compacted)).to be true
       end
 
       it 'deems an unsafe compacting as such' do
         compacted = compact(json)
         deemed_compatible = patch_for_forwarding!(json, compacted)
         expect(compacted['to']).to eq ['https://www.w3.org/ns/activitystreams#Public']
-        expect(safe_for_forwarding?(json, compacted)).to eq false
+        expect(safe_for_forwarding?(json, compacted)).to be false
       end
     end
   end
diff --git a/spec/helpers/statuses_helper_spec.rb b/spec/helpers/statuses_helper_spec.rb
index cba659bfb..ce2a4680e 100644
--- a/spec/helpers/statuses_helper_spec.rb
+++ b/spec/helpers/statuses_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe StatusesHelper, type: :helper do