glogin 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/glogin/auth.rb +1 -1
- data/lib/glogin/version.rb +1 -1
- data/test/glogin/test_auth.rb +7 -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: 6960c45e5d074619ac8a5b4997f5fca734f445ffbf2ea203bf6264436af521ff
|
4
|
+
data.tar.gz: 6718628c2085dca6a4dae18a3eea5e0de734dfe99676530d7fc70d3dea166bf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe27db59e34f29a75550a21641710a6f199bf9be582c065d0dd94aca1448a0193e2f481aeae5d642e29202e077355b684f5a3cc5e2a7639ba2f276edb475468b
|
7
|
+
data.tar.gz: ef9537ee5ec99726b5e02658a12905f35b411cc5aeaa139ca4a15902645e823504f24ffdd0ce1fe1cbbf35d60feb36ce686ba1bf94b8e4f98455cf09f7add689
|
data/lib/glogin/auth.rb
CHANGED
data/lib/glogin/version.rb
CHANGED
data/test/glogin/test_auth.rb
CHANGED
@@ -58,4 +58,11 @@ class TestAuth < Minitest::Test
|
|
58
58
|
auth = GLogin::Auth.new('99999', '', 'http://www.example.com/github-oauth')
|
59
59
|
assert_equal('yegor256', auth.user('1234567890')['login'])
|
60
60
|
end
|
61
|
+
|
62
|
+
def test_failed_authentication
|
63
|
+
auth = GLogin::Auth.new('1234', '4433', 'https://example.org')
|
64
|
+
stub_request(:post, 'https://github.com/login/oauth/access_token').to_return(status: 401)
|
65
|
+
e = assert_raises { auth.user('437849732894732') }
|
66
|
+
assert(e.message.include?('with code "43784***'))
|
67
|
+
end
|
61
68
|
end
|