social-url 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/social_url.rb +1 -1
- data/lib/social_url/network.rb +1 -1
- data/lib/social_url/version.rb +1 -1
- data/test/lib/social_url/networks/twitter_test.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae9cbc8d49497bb8599917d937a21cc2da61999aabc53a4a1db795fa2c5e850a
|
4
|
+
data.tar.gz: 0f481c6db1389e3b09ac04b0a965175dad46b9b4a594e55a7b827f186e80b96f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e85a72c8d0a307c6125ccc118ab4456a46c8be4e5c64da89d556d5cf052d63bff99464abc2cb98c1a71fc7d20a6ad769fd3c981f5263e54a9a8f268925340e18
|
7
|
+
data.tar.gz: cbc3529fd307562a292bdb2a14faa5fa79bdb394185f0517514dae78a690ad796807423c987997cd46c427a52c1524f1027f956e6f41b3beca18191ede75f81a
|
data/lib/social_url.rb
CHANGED
data/lib/social_url/network.rb
CHANGED
data/lib/social_url/version.rb
CHANGED
@@ -23,4 +23,18 @@ class SocialUrl::Networks::TwitterTest < Minitest::Test
|
|
23
23
|
|
24
24
|
assert_equal url, SocialUrl::Networks::Twitter.new(params).url
|
25
25
|
end
|
26
|
+
|
27
|
+
def test_url_for_bare_message
|
28
|
+
params = SocialUrl.normalize(
|
29
|
+
text: "Hello World",
|
30
|
+
url: "http://example.com",
|
31
|
+
hashtags: ["nature", "sunset", "Multi Word HashTag"]
|
32
|
+
)
|
33
|
+
|
34
|
+
url = ["https://twitter.com/intent/tweet/?text=Hello%20World",
|
35
|
+
"&url=http%3A%2F%2Fexample.com",
|
36
|
+
"&hashtags=nature,sunset,MultiWordHashTag"].join
|
37
|
+
|
38
|
+
assert_equal url, SocialUrl::Networks::Twitter.new(params).url
|
39
|
+
end
|
26
40
|
end
|