Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blogspot normalization edge-case issues #54

Open
jage opened this issue Oct 28, 2015 · 0 comments
Open

Blogspot normalization edge-case issues #54

jage opened this issue Oct 28, 2015 · 0 comments
Labels

Comments

@jage
Copy link
Contributor

jage commented Oct 28, 2015

Diff:

$ git diff
diff --git a/spec/lib/twingly/url_spec.rb b/spec/lib/twingly/url_spec.rb
index 85c2903..d64efa8 100644
--- a/spec/lib/twingly/url_spec.rb
+++ b/spec/lib/twingly/url_spec.rb
@@ -197,6 +197,20 @@ describe Twingly::URL do
       it { is_expected.to eq(expected) }
     end

+    context "adds www if host is missing a subdomain" do
+      let(:url)      { "http://blogspot.com/" }
+      let(:expected) { "http://www.blogspot.com/" }
+
+      it { is_expected.to eq(expected) }
+    end
+
+    context "keeps www if host is missing a subdomain" do
+      let(:url)      { "http://www.blogspot.com/" }
+      let(:expected) { "http://www.blogspot.com/" }
+
+      it { is_expected.to eq(expected) }
+    end
+
     context "does not add www if the host has a subdomain" do
       let(:url) { "http://blog.twingly.com/" }
@jage jage added the bug label Oct 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant