workarea-testing 3.4.31 → 3.4.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/workarea/integration_test.rb +1 -0
- data/lib/workarea/performance_test.rb +1 -0
- data/lib/workarea/system_test.rb +1 -0
- data/lib/workarea/test_case.rb +31 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8b284f5759a8bbc0b0ae6f0d86b9019087c0105a
|
4
|
+
data.tar.gz: a8109a59fd275b42ee6f24dc656d090b73546a12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 484b77b6e3e81ed1c1db6ea673d26968bb5541444b040506ded8eaed815510c13e00060e6101b9a741fe07bc3fe577116e9a4378d9092485dcbe13cfb19d8cd7
|
7
|
+
data.tar.gz: 5b410b73e47b68cdbc0a7809e07dbe984d47a5d308804ceafe07d0d113197a63052f3a27287a2cc65417943d83335ee8269705d581d8b7db9f94544d52109c4c
|
data/lib/workarea/system_test.rb
CHANGED
data/lib/workarea/test_case.rb
CHANGED
@@ -126,10 +126,11 @@ module Workarea
|
|
126
126
|
delegate :t, to: :I18n
|
127
127
|
end
|
128
128
|
|
129
|
-
def set_locales(available:, default:, current: nil)
|
129
|
+
def set_locales(available:, default:, current: nil, fallbacks: nil)
|
130
130
|
Rails.application.config.i18n.available_locales = I18n.available_locales = available
|
131
131
|
Rails.application.config.i18n.default_locale = I18n.default_locale = default
|
132
132
|
I18n.locale = current || default
|
133
|
+
I18n.fallbacks = fallbacks if I18n.respond_to?(:fallbacks=)
|
133
134
|
end
|
134
135
|
|
135
136
|
def save_locales
|
@@ -139,6 +140,7 @@ module Workarea
|
|
139
140
|
@current_i18n_available_locales = I18n.available_locales
|
140
141
|
@current_i18n_default_locale = I18n.default_locale
|
141
142
|
@current_i18n_locale = I18n.default_locale
|
143
|
+
@current_i18n_fallbacks = I18n.try(:fallbacks)
|
142
144
|
end
|
143
145
|
|
144
146
|
def restore_locales
|
@@ -148,6 +150,7 @@ module Workarea
|
|
148
150
|
I18n.available_locales = @current_i18n_available_locales
|
149
151
|
I18n.default_locale = @current_i18n_default_locale
|
150
152
|
I18n.locale = @current_i18n_locale
|
153
|
+
I18n.fallbacks = @current_i18n_fallbacks if I18n.respond_to?(:fallbacks=)
|
151
154
|
end
|
152
155
|
end
|
153
156
|
|
@@ -161,12 +164,37 @@ module Workarea
|
|
161
164
|
|
162
165
|
def mock_s3
|
163
166
|
Fog.mock!
|
164
|
-
Workarea.s3.directories.create(key: Configuration::S3.bucket)
|
167
|
+
Workarea.s3.directories.create(key: Workarea::Configuration::S3.bucket)
|
168
|
+
Workarea.s3.stubs(:get_bucket_cors).returns(mock_s3_cors_response)
|
169
|
+
Workarea.s3.stubs(:put_bucket_cors)
|
165
170
|
end
|
166
171
|
|
167
172
|
def reset_s3
|
168
173
|
Fog::Mock.reset
|
169
174
|
end
|
175
|
+
|
176
|
+
def mock_s3_cors_response
|
177
|
+
result = mock('Excon::Response')
|
178
|
+
result.stubs(data: { body: { 'CORSConfiguration' => [] } })
|
179
|
+
result
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
module Geocoder
|
184
|
+
extend ActiveSupport::Concern
|
185
|
+
|
186
|
+
included do
|
187
|
+
setup :save_geocoder_config
|
188
|
+
teardown :restore_geocoder_config
|
189
|
+
end
|
190
|
+
|
191
|
+
def save_geocoder_config
|
192
|
+
@original_geocoder_config = ::Geocoder.config.deep_dup
|
193
|
+
end
|
194
|
+
|
195
|
+
def restore_geocoder_config
|
196
|
+
::Geocoder.configure(@original_geocoder_config)
|
197
|
+
end
|
170
198
|
end
|
171
199
|
|
172
200
|
extend Decoration
|
@@ -176,6 +204,7 @@ module Workarea
|
|
176
204
|
include RunnerLocation
|
177
205
|
include Locales
|
178
206
|
include S3
|
207
|
+
include Geocoder
|
179
208
|
|
180
209
|
setup do
|
181
210
|
Mongoid.truncate!
|
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.4.
|
4
|
+
version: 3.4.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-07 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.4.
|
19
|
+
version: 3.4.36
|
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.4.
|
26
|
+
version: 3.4.36
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,7 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
|
-
|
250
|
+
rubyforge_project:
|
251
|
+
rubygems_version: 2.6.14.1
|
251
252
|
signing_key:
|
252
253
|
specification_version: 4
|
253
254
|
summary: Testing tools for the Workarea Commerce Platform
|