http_status_checker 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a39372c3765ae03312978566c678ba0f8e0358e
|
4
|
+
data.tar.gz: c7ecabc3effcd2cfefee29d7f0295e0ec84433a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72a2303bf664b690b52de1a8cf85711f3f0bc123afc7e7de60d0fdd8b67bd46001afb2512615d84c77cb53cf9c826921a14fa20cf12e3f98d224c146de55c3e0
|
7
|
+
data.tar.gz: 8cf114f84f961c40cd9b7e9a768080c0af1a00ad2a114778800f0d8a4cb48f84710babe29e809d8a126ae4261a34d3f0fa75761fc761333504906da5f5e55775
|
data/lib/http_status_checker.rb
CHANGED
@@ -6,6 +6,7 @@ describe HttpStatusChecker::Connection do
|
|
6
6
|
let!(:redirect_url) { 'http://yahoo.co.jp/' }
|
7
7
|
let!(:atnd_http_url) { 'http://atnd.org/events/14386' }
|
8
8
|
let!(:atnd_https_url) { 'https://atnd.org/events/14386' }
|
9
|
+
let!(:doorkeeper_url) { 'http://mashupawards.doorkeeper.jp/events/18590' }
|
9
10
|
|
10
11
|
context 'when get http valid url' do
|
11
12
|
it 'return Net::HTTPOK response' do
|
@@ -31,6 +32,14 @@ describe HttpStatusChecker::Connection do
|
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
35
|
+
context 'when get http url' do
|
36
|
+
it 'return Net::HTTPRedirection response' do
|
37
|
+
response = HttpStatusChecker::Connection.get_header(doorkeeper_url)
|
38
|
+
expect(response.is_a?(Net::HTTPOK)).to be == true
|
39
|
+
expect(response['location']).to be_nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
34
43
|
context 'when get http invalid url' do
|
35
44
|
let!(:invalid_url) { 'http://www.nothing-dummy.com/' }
|
36
45
|
it 'raise SocketError' do
|