leantesting 1.0.0
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +10 -0
- data/README.md +348 -0
- data/Rakefile +9 -0
- data/leantesting.gemspec +20 -0
- data/lib/BaseClass/APIRequest.rb +195 -0
- data/lib/BaseClass/Entity.rb +33 -0
- data/lib/BaseClass/EntityHandler.rb +183 -0
- data/lib/BaseClass/EntityList.rb +188 -0
- data/lib/Entity/Bug/Bug.rb +11 -0
- data/lib/Entity/Bug/BugAttachment.rb +7 -0
- data/lib/Entity/Bug/BugComment.rb +7 -0
- data/lib/Entity/Platform/PlatformBrowser.rb +10 -0
- data/lib/Entity/Platform/PlatformBrowserVersion.rb +7 -0
- data/lib/Entity/Platform/PlatformDevice.rb +7 -0
- data/lib/Entity/Platform/PlatformOS.rb +10 -0
- data/lib/Entity/Platform/PlatformOSVersion.rb +7 -0
- data/lib/Entity/Platform/PlatformType.rb +10 -0
- data/lib/Entity/Project/Project.rb +27 -0
- data/lib/Entity/Project/ProjectBugScheme.rb +7 -0
- data/lib/Entity/Project/ProjectSection.rb +7 -0
- data/lib/Entity/Project/ProjectUser.rb +7 -0
- data/lib/Entity/Project/ProjectVersion.rb +7 -0
- data/lib/Entity/User/UserOrganization.rb +7 -0
- data/lib/Exception/BaseException/SDKException.rb +19 -0
- data/lib/Exception/SDKBadJSONResponseException.rb +15 -0
- data/lib/Exception/SDKDuplicateRequestException.rb +19 -0
- data/lib/Exception/SDKErrorResponseException.rb +13 -0
- data/lib/Exception/SDKIncompleteRequestException.rb +19 -0
- data/lib/Exception/SDKInvalidArgException.rb +15 -0
- data/lib/Exception/SDKMissingArgException.rb +15 -0
- data/lib/Exception/SDKUnexpectedResponseException.rb +15 -0
- data/lib/Exception/SDKUnsupportedRequestException.rb +19 -0
- data/lib/Handler/Attachment/AttachmentsHandler.rb +17 -0
- data/lib/Handler/Auth/OAuth2Handler.rb +118 -0
- data/lib/Handler/Bug/BugAttachmentsHandler.rb +51 -0
- data/lib/Handler/Bug/BugCommentsHandler.rb +20 -0
- data/lib/Handler/Bug/BugsHandler.rb +57 -0
- data/lib/Handler/Platform/PlatformBrowserVersionsHandler.rb +20 -0
- data/lib/Handler/Platform/PlatformBrowsersHandler.rb +23 -0
- data/lib/Handler/Platform/PlatformDevicesHandler.rb +10 -0
- data/lib/Handler/Platform/PlatformHandler.rb +22 -0
- data/lib/Handler/Platform/PlatformOSHandler.rb +23 -0
- data/lib/Handler/Platform/PlatformOSVersionsHandler.rb +20 -0
- data/lib/Handler/Platform/PlatformTypeDevicesHandler.rb +20 -0
- data/lib/Handler/Platform/PlatformTypesHandler.rb +21 -0
- data/lib/Handler/Project/ProjectBugReproducibilitySchemeHandler.rb +20 -0
- data/lib/Handler/Project/ProjectBugSeveritySchemeHandler.rb +20 -0
- data/lib/Handler/Project/ProjectBugStatusSchemeHandler.rb +20 -0
- data/lib/Handler/Project/ProjectBugTypeSchemeHandler.rb +20 -0
- data/lib/Handler/Project/ProjectBugsHandler.rb +67 -0
- data/lib/Handler/Project/ProjectSectionsHandler.rb +39 -0
- data/lib/Handler/Project/ProjectUsersHandler.rb +20 -0
- data/lib/Handler/Project/ProjectVersionsHandler.rb +39 -0
- data/lib/Handler/Project/ProjectsHandler.rb +46 -0
- data/lib/Handler/User/UserHandler.rb +14 -0
- data/lib/Handler/User/UserOrganizationsHandler.rb +14 -0
- data/lib/leantesting.rb +65 -0
- data/lib/loader.rb +18 -0
- data/tests/APIRequestTest.rb +152 -0
- data/tests/BaseClassesTest.rb +96 -0
- data/tests/ClientTest.rb +52 -0
- data/tests/EntitiesTest.rb +97 -0
- data/tests/EntityListTest.rb +51 -0
- data/tests/ExceptionsTest.rb +70 -0
- data/tests/HandlersRequestsTest.rb +215 -0
- data/tests/MockRequestsTest.rb +556 -0
- data/tests/OAuth2HandlerTest.rb +75 -0
- data/tests/res/upload_sample.jpg +0 -0
- metadata +169 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler.require(:default, :test)
|
3
|
+
|
4
|
+
require_relative '../lib/Client'
|
5
|
+
|
6
|
+
class OAuth2HandlerTest < MiniTest::Test
|
7
|
+
|
8
|
+
def test_OAuth2HandlerDefined
|
9
|
+
OAuth2Handler
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
def test_OAuth2HandlerGenerateNonStrClientID
|
16
|
+
assert_raises SDKInvalidArgException do
|
17
|
+
OAuth2Handler.new(Client.new).generateAuthLink(1, '', '')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
def test_OAuth2HandlerGenerateNonStrRedirectURI
|
21
|
+
assert_raises SDKInvalidArgException do
|
22
|
+
OAuth2Handler.new(Client.new).generateAuthLink('', 1, '')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
def test_OAuth2HandlerGenerateNonStrScope
|
26
|
+
assert_raises SDKInvalidArgException do
|
27
|
+
OAuth2Handler.new(Client.new).generateAuthLink('', '', 1)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
def test_OAuth2HandlerGenerateNonStrState
|
31
|
+
assert_raises SDKInvalidArgException do
|
32
|
+
OAuth2Handler.new(Client.new).generateAuthLink('', '', '', 1)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
def test_OAuth2HandlerExchangeNonStrClientID
|
40
|
+
assert_raises SDKInvalidArgException do
|
41
|
+
client = Client.new
|
42
|
+
client.debugReturn = '{}'
|
43
|
+
OAuth2Handler.new(client).exchangeAuthCode(1, '', '', '', '')
|
44
|
+
end
|
45
|
+
end
|
46
|
+
def test_OAuth2HandlerExchangeNonStrClientSecret
|
47
|
+
assert_raises SDKInvalidArgException do
|
48
|
+
client = Client.new
|
49
|
+
client.debugReturn = '{}'
|
50
|
+
OAuth2Handler.new(client).exchangeAuthCode('', 1, '', '', '')
|
51
|
+
end
|
52
|
+
end
|
53
|
+
def test_OAuth2HandlerExchangeNonStrGrantType
|
54
|
+
assert_raises SDKInvalidArgException do
|
55
|
+
client = Client.new
|
56
|
+
client.debugReturn = '{}'
|
57
|
+
OAuth2Handler.new(client).exchangeAuthCode('', '', 1, '', '')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
def test_OAuth2HandlerExchangeNonStrCode
|
61
|
+
assert_raises SDKInvalidArgException do
|
62
|
+
client = Client.new
|
63
|
+
client.debugReturn = '{}'
|
64
|
+
OAuth2Handler.new(client).exchangeAuthCode('', '', '', 1, '')
|
65
|
+
end
|
66
|
+
end
|
67
|
+
def test_OAuth2HandlerExchangeNonStrRedirectURI
|
68
|
+
assert_raises SDKInvalidArgException do
|
69
|
+
client = Client.new
|
70
|
+
client.debugReturn = '{}'
|
71
|
+
OAuth2Handler.new(client).exchangeAuthCode('', '', '', '', 1)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: leantesting
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcel Bontaș
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.8'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: curb
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.8'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.8'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mocha
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.1'
|
69
|
+
description: Lean Testing Ruby SDK
|
70
|
+
email:
|
71
|
+
- marcel.bontas@yandex.ru
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- Gemfile
|
77
|
+
- LICENSE
|
78
|
+
- README.md
|
79
|
+
- Rakefile
|
80
|
+
- leantesting.gemspec
|
81
|
+
- lib/BaseClass/APIRequest.rb
|
82
|
+
- lib/BaseClass/Entity.rb
|
83
|
+
- lib/BaseClass/EntityHandler.rb
|
84
|
+
- lib/BaseClass/EntityList.rb
|
85
|
+
- lib/Entity/Bug/Bug.rb
|
86
|
+
- lib/Entity/Bug/BugAttachment.rb
|
87
|
+
- lib/Entity/Bug/BugComment.rb
|
88
|
+
- lib/Entity/Platform/PlatformBrowser.rb
|
89
|
+
- lib/Entity/Platform/PlatformBrowserVersion.rb
|
90
|
+
- lib/Entity/Platform/PlatformDevice.rb
|
91
|
+
- lib/Entity/Platform/PlatformOS.rb
|
92
|
+
- lib/Entity/Platform/PlatformOSVersion.rb
|
93
|
+
- lib/Entity/Platform/PlatformType.rb
|
94
|
+
- lib/Entity/Project/Project.rb
|
95
|
+
- lib/Entity/Project/ProjectBugScheme.rb
|
96
|
+
- lib/Entity/Project/ProjectSection.rb
|
97
|
+
- lib/Entity/Project/ProjectUser.rb
|
98
|
+
- lib/Entity/Project/ProjectVersion.rb
|
99
|
+
- lib/Entity/User/UserOrganization.rb
|
100
|
+
- lib/Exception/BaseException/SDKException.rb
|
101
|
+
- lib/Exception/SDKBadJSONResponseException.rb
|
102
|
+
- lib/Exception/SDKDuplicateRequestException.rb
|
103
|
+
- lib/Exception/SDKErrorResponseException.rb
|
104
|
+
- lib/Exception/SDKIncompleteRequestException.rb
|
105
|
+
- lib/Exception/SDKInvalidArgException.rb
|
106
|
+
- lib/Exception/SDKMissingArgException.rb
|
107
|
+
- lib/Exception/SDKUnexpectedResponseException.rb
|
108
|
+
- lib/Exception/SDKUnsupportedRequestException.rb
|
109
|
+
- lib/Handler/Attachment/AttachmentsHandler.rb
|
110
|
+
- lib/Handler/Auth/OAuth2Handler.rb
|
111
|
+
- lib/Handler/Bug/BugAttachmentsHandler.rb
|
112
|
+
- lib/Handler/Bug/BugCommentsHandler.rb
|
113
|
+
- lib/Handler/Bug/BugsHandler.rb
|
114
|
+
- lib/Handler/Platform/PlatformBrowserVersionsHandler.rb
|
115
|
+
- lib/Handler/Platform/PlatformBrowsersHandler.rb
|
116
|
+
- lib/Handler/Platform/PlatformDevicesHandler.rb
|
117
|
+
- lib/Handler/Platform/PlatformHandler.rb
|
118
|
+
- lib/Handler/Platform/PlatformOSHandler.rb
|
119
|
+
- lib/Handler/Platform/PlatformOSVersionsHandler.rb
|
120
|
+
- lib/Handler/Platform/PlatformTypeDevicesHandler.rb
|
121
|
+
- lib/Handler/Platform/PlatformTypesHandler.rb
|
122
|
+
- lib/Handler/Project/ProjectBugReproducibilitySchemeHandler.rb
|
123
|
+
- lib/Handler/Project/ProjectBugSeveritySchemeHandler.rb
|
124
|
+
- lib/Handler/Project/ProjectBugStatusSchemeHandler.rb
|
125
|
+
- lib/Handler/Project/ProjectBugTypeSchemeHandler.rb
|
126
|
+
- lib/Handler/Project/ProjectBugsHandler.rb
|
127
|
+
- lib/Handler/Project/ProjectSectionsHandler.rb
|
128
|
+
- lib/Handler/Project/ProjectUsersHandler.rb
|
129
|
+
- lib/Handler/Project/ProjectVersionsHandler.rb
|
130
|
+
- lib/Handler/Project/ProjectsHandler.rb
|
131
|
+
- lib/Handler/User/UserHandler.rb
|
132
|
+
- lib/Handler/User/UserOrganizationsHandler.rb
|
133
|
+
- lib/leantesting.rb
|
134
|
+
- lib/loader.rb
|
135
|
+
- tests/APIRequestTest.rb
|
136
|
+
- tests/BaseClassesTest.rb
|
137
|
+
- tests/ClientTest.rb
|
138
|
+
- tests/EntitiesTest.rb
|
139
|
+
- tests/EntityListTest.rb
|
140
|
+
- tests/ExceptionsTest.rb
|
141
|
+
- tests/HandlersRequestsTest.rb
|
142
|
+
- tests/MockRequestsTest.rb
|
143
|
+
- tests/OAuth2HandlerTest.rb
|
144
|
+
- tests/res/upload_sample.jpg
|
145
|
+
homepage: https://leantesting.com/
|
146
|
+
licenses:
|
147
|
+
- proprietary
|
148
|
+
metadata: {}
|
149
|
+
post_install_message:
|
150
|
+
rdoc_options: []
|
151
|
+
require_paths:
|
152
|
+
- lib
|
153
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
requirements: []
|
164
|
+
rubyforge_project:
|
165
|
+
rubygems_version: 2.4.6
|
166
|
+
signing_key:
|
167
|
+
specification_version: 4
|
168
|
+
summary: Lean Testing Ruby SDK
|
169
|
+
test_files: []
|