about summary refs log tree commit diff
path: root/spec/lib/tag_manager_spec.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-04-14 19:22:47 -0500
committerStarfall <us@starfall.systems>2023-04-14 19:22:47 -0500
commit4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (patch)
tree6811b845bb7f4966b10dcefa3dea404246f161c7 /spec/lib/tag_manager_spec.rb
parent65c1e53a32cabcdbb7bca57002bb0f6acdebe07e (diff)
parentbed63f6dae0879ac840066b031229e0d139089cd (diff)
Merge remote-tracking branch 'glitch/main' HEAD main
Diffstat (limited to 'spec/lib/tag_manager_spec.rb')
-rw-r--r--spec/lib/tag_manager_spec.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/lib/tag_manager_spec.rb b/spec/lib/tag_manager_spec.rb
index cd9fb936c..8de290541 100644
--- a/spec/lib/tag_manager_spec.rb
+++ b/spec/lib/tag_manager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe TagManager do
@@ -14,15 +16,15 @@ RSpec.describe TagManager do
     end
 
     it 'returns true for nil' do
-      expect(TagManager.instance.local_domain?(nil)).to eq true
+      expect(TagManager.instance.local_domain?(nil)).to be true
     end
 
     it 'returns true if the slash-stripped string equals to local domain' do
-      expect(TagManager.instance.local_domain?('DoMaIn.Example.com/')).to eq true
+      expect(TagManager.instance.local_domain?('DoMaIn.Example.com/')).to be true
     end
 
     it 'returns false for irrelevant string' do
-      expect(TagManager.instance.local_domain?('DoMaIn.Example.com!')).to eq false
+      expect(TagManager.instance.local_domain?('DoMaIn.Example.com!')).to be false
     end
   end
 
@@ -39,21 +41,21 @@ RSpec.describe TagManager do
     end
 
     it 'returns true for nil' do
-      expect(TagManager.instance.web_domain?(nil)).to eq true
+      expect(TagManager.instance.web_domain?(nil)).to be true
     end
 
     it 'returns true if the slash-stripped string equals to web domain' do
-      expect(TagManager.instance.web_domain?('DoMaIn.Example.com/')).to eq true
+      expect(TagManager.instance.web_domain?('DoMaIn.Example.com/')).to be true
     end
 
     it 'returns false for string with irrelevant characters' do
-      expect(TagManager.instance.web_domain?('DoMaIn.Example.com!')).to eq false
+      expect(TagManager.instance.web_domain?('DoMaIn.Example.com!')).to be false
     end
   end
 
   describe '#normalize_domain' do
     it 'returns nil if the given parameter is nil' do
-      expect(TagManager.instance.normalize_domain(nil)).to eq nil
+      expect(TagManager.instance.normalize_domain(nil)).to be_nil
     end
 
     it 'returns normalized domain' do
@@ -70,17 +72,17 @@ RSpec.describe TagManager do
 
     it 'returns true if the normalized string with port is local URL' do
       Rails.configuration.x.web_domain = 'domain.example.com:42'
-      expect(TagManager.instance.local_url?('https://DoMaIn.Example.com:42/')).to eq true
+      expect(TagManager.instance.local_url?('https://DoMaIn.Example.com:42/')).to be true
     end
 
     it 'returns true if the normalized string without port is local URL' do
       Rails.configuration.x.web_domain = 'domain.example.com'
-      expect(TagManager.instance.local_url?('https://DoMaIn.Example.com/')).to eq true
+      expect(TagManager.instance.local_url?('https://DoMaIn.Example.com/')).to be true
     end
 
     it 'returns false for string with irrelevant characters' do
       Rails.configuration.x.web_domain = 'domain.example.com'
-      expect(TagManager.instance.local_url?('https://domain.example.net/')).to eq false
+      expect(TagManager.instance.local_url?('https://domain.example.net/')).to be false
     end
   end
 end