workarea-testing 3.5.0.beta.1 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/workarea/generator_test.rb +2 -0
- data/lib/workarea/integration_test.rb +2 -6
- data/lib/workarea/mailer_test.rb +2 -8
- data/lib/workarea/test_case.rb +26 -8
- data/lib/workarea/testing/factories/payment.rb +4 -0
- data/lib/workarea/testing/factory_configuration.rb +1 -1
- data/lib/workarea/view_test.rb +2 -8
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a071ff2e05dc9e291b640c57afd3f3b2f38f1b6c2131763dccb726f801cc721f
|
4
|
+
data.tar.gz: 0b90ce4fef7fdf4dba8cd28434d2df1cecc4c5516ddfe6108fe73fe6c22dbbf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c013b55f2ab1500b44ffe319c3de4f78c4ddc5d09d14925226c3472f919f1124df9aa3c83d3d92a7657a003afae72aad5edbe855386d596d3080ea27bb1a67ae
|
7
|
+
data.tar.gz: 6080b029bb8ba7d0d31b0364a9ffe66908413be53003baa413e8aba9a2472a804e782ef8a9aaa8d2cbbe360ae18c2567e92802214e0382e381e5951e5bc96d11
|
@@ -2,17 +2,13 @@ module Workarea
|
|
2
2
|
class IntegrationTest < ActionDispatch::IntegrationTest
|
3
3
|
module Configuration
|
4
4
|
extend ActiveSupport::Concern
|
5
|
+
include TestCase::Setup
|
6
|
+
include TestCase::Teardown
|
5
7
|
|
6
8
|
included do
|
7
9
|
setup do
|
8
|
-
Mongoid.truncate!
|
9
|
-
Workarea.redis.flushdb
|
10
10
|
default_url_options[:locale] = nil
|
11
11
|
end
|
12
|
-
|
13
|
-
teardown do
|
14
|
-
travel_back
|
15
|
-
end
|
16
12
|
end
|
17
13
|
|
18
14
|
def set_current_user(user)
|
data/lib/workarea/mailer_test.rb
CHANGED
@@ -2,6 +2,8 @@ module Workarea
|
|
2
2
|
class MailerTest < ActionMailer::TestCase
|
3
3
|
extend TestCase::Decoration
|
4
4
|
extend TestCase::RunnerLocation
|
5
|
+
include TestCase::Setup
|
6
|
+
include TestCase::Teardown
|
5
7
|
include TestCase::Configuration
|
6
8
|
include Factories
|
7
9
|
include TestCase::Workers
|
@@ -11,13 +13,5 @@ module Workarea
|
|
11
13
|
include TestCase::Encryption
|
12
14
|
include TestCase::SearchIndexing
|
13
15
|
include TestCase::Mail
|
14
|
-
|
15
|
-
setup do
|
16
|
-
Mongoid.truncate!
|
17
|
-
Workarea.redis.flushdb
|
18
|
-
WebMock.disable_net_connect!(allow_localhost: true)
|
19
|
-
end
|
20
|
-
|
21
|
-
teardown :travel_back
|
22
16
|
end
|
23
17
|
end
|
data/lib/workarea/test_case.rb
CHANGED
@@ -208,8 +208,34 @@ module Workarea
|
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
211
|
+
module Setup
|
212
|
+
extend ActiveSupport::Concern
|
213
|
+
|
214
|
+
included do
|
215
|
+
setup do
|
216
|
+
Mongoid.truncate!
|
217
|
+
Workarea.redis.flushdb
|
218
|
+
WebMock.disable_net_connect!(allow_localhost: true)
|
219
|
+
ActionMailer::Base.deliveries.clear
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
module Teardown
|
225
|
+
extend ActiveSupport::Concern
|
226
|
+
|
227
|
+
included do
|
228
|
+
teardown do
|
229
|
+
travel_back
|
230
|
+
CurrentSegments.reset_segmented_content
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
211
235
|
extend Decoration
|
212
236
|
extend RunnerLocation
|
237
|
+
include Setup
|
238
|
+
include Teardown
|
213
239
|
include Configuration
|
214
240
|
include Factories
|
215
241
|
include Workers
|
@@ -219,20 +245,12 @@ module Workarea
|
|
219
245
|
include Encryption
|
220
246
|
|
221
247
|
setup do
|
222
|
-
Mongoid.truncate!
|
223
|
-
Workarea.redis.flushdb
|
224
|
-
WebMock.disable_net_connect!(allow_localhost: true)
|
225
248
|
Workarea.config.send_email = false
|
226
249
|
Workarea.config.send_transactional_emails = false
|
227
|
-
ActionMailer::Base.deliveries.clear
|
228
250
|
|
229
251
|
Sidekiq::Testing.inline!
|
230
252
|
Sidekiq::Callbacks.inline
|
231
253
|
Sidekiq::Callbacks.disable
|
232
254
|
end
|
233
|
-
|
234
|
-
teardown do
|
235
|
-
travel_back
|
236
|
-
end
|
237
255
|
end
|
238
256
|
end
|
@@ -38,7 +38,7 @@ defaults.import = { model_type: 'Workarea::Catalog::Product' }
|
|
38
38
|
defaults.export = Proc.new { { model_type: 'Workarea::Catalog::Product', query_id: Workarea::Search::AdminProducts.new.to_global_id } }
|
39
39
|
|
40
40
|
# factories/fulfillment.rb
|
41
|
-
defaults.fulfillment_sku = { id: '2134', policy: '
|
41
|
+
defaults.fulfillment_sku = { id: '2134', policy: 'shipping' }
|
42
42
|
defaults.fulfillment_token = { order_id: '1234', order_item_id: '3456', sku: '2134' }
|
43
43
|
|
44
44
|
# factories/insights.rb
|
data/lib/workarea/view_test.rb
CHANGED
@@ -16,6 +16,8 @@ end
|
|
16
16
|
module Workarea
|
17
17
|
class ViewTest < ActionView::TestCase
|
18
18
|
extend TestCase::Decoration
|
19
|
+
include TestCase::Setup
|
20
|
+
include TestCase::Teardown
|
19
21
|
include TestCase::Configuration
|
20
22
|
include TestCase::RunnerLocation
|
21
23
|
include Factories
|
@@ -23,19 +25,11 @@ module Workarea
|
|
23
25
|
include TestCase::Locales
|
24
26
|
|
25
27
|
setup do
|
26
|
-
Mongoid.truncate!
|
27
|
-
Workarea.redis.flushdb
|
28
|
-
WebMock.disable_net_connect!(allow_localhost: true)
|
29
28
|
Workarea.config.send_email = false
|
30
|
-
ActionMailer::Base.deliveries.clear
|
31
29
|
|
32
30
|
Sidekiq::Testing.inline!
|
33
31
|
Sidekiq::Callbacks.inline
|
34
32
|
Sidekiq::Callbacks.disable
|
35
33
|
end
|
36
|
-
|
37
|
-
teardown do
|
38
|
-
travel_back
|
39
|
-
end
|
40
34
|
end
|
41
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.0
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.5.0
|
19
|
+
version: 3.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.5.0
|
26
|
+
version: 3.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -262,9 +262,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: 2.3.0
|
263
263
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
264
|
requirements:
|
265
|
-
- - "
|
265
|
+
- - ">="
|
266
266
|
- !ruby/object:Gem::Version
|
267
|
-
version:
|
267
|
+
version: '0'
|
268
268
|
requirements: []
|
269
269
|
rubygems_version: 3.0.6
|
270
270
|
signing_key:
|