Fixed issue #2089 - timezone issue with report graphs not displaying or displaying $timezone hours out of step.
This commit is contained in:
parent
8f30c37ddf
commit
3acfa4a277
27 changed files with 239 additions and 278 deletions
10
Gemfile
10
Gemfile
|
@ -17,8 +17,8 @@ gem 'unicorn', group: :unicorn
|
|||
|
||||
# core - supported ORMs
|
||||
gem 'activerecord-nulldb-adapter', group: :nulldb
|
||||
gem 'mysql2', group: :mysql
|
||||
gem 'pg', group: :postgres
|
||||
gem 'mysql2', '0.4.10', group: :mysql
|
||||
gem 'pg', '0.21.0', group: :postgres
|
||||
|
||||
# core - asynchrous task execution
|
||||
gem 'daemons'
|
||||
|
@ -29,7 +29,7 @@ gem 'em-websocket'
|
|||
gem 'eventmachine'
|
||||
|
||||
# core - password security
|
||||
gem 'argon2'
|
||||
gem 'argon2', '1.1.5'
|
||||
|
||||
# performance - Memcached
|
||||
gem 'dalli'
|
||||
|
@ -53,7 +53,7 @@ gem 'autoprefixer-rails'
|
|||
# asset handling - javascript execution for e.g. linux
|
||||
gem 'execjs'
|
||||
gem 'libv8'
|
||||
gem 'therubyracer'
|
||||
gem 'mini_racer'
|
||||
|
||||
# authentication - provider
|
||||
gem 'doorkeeper'
|
||||
|
@ -117,7 +117,7 @@ gem 'rubyntlm', git: 'https://github.com/wimm/rubyntlm'
|
|||
gem 'viewpoint'
|
||||
|
||||
# image processing
|
||||
gem 'rszr'
|
||||
gem 'rszr', '0.4.0'
|
||||
|
||||
# Gems used only for develop/test and not required
|
||||
# in production environments by default.
|
||||
|
|
186
Gemfile.lock
186
Gemfile.lock
|
@ -79,16 +79,16 @@ GEM
|
|||
activemodel (= 5.1.6.2)
|
||||
activesupport (= 5.1.6.2)
|
||||
arel (~> 8.0)
|
||||
activerecord-import (0.25.0)
|
||||
activerecord-import (1.0.1)
|
||||
activerecord (>= 3.2)
|
||||
activerecord-nulldb-adapter (0.3.7)
|
||||
activerecord-nulldb-adapter (0.3.9)
|
||||
activerecord (>= 2.0.0)
|
||||
activerecord-session_store (1.1.0)
|
||||
actionpack (>= 4.0, < 5.2)
|
||||
activerecord (>= 4.0, < 5.2)
|
||||
activerecord-session_store (1.1.3)
|
||||
actionpack (>= 4.0)
|
||||
activerecord (>= 4.0)
|
||||
multi_json (~> 1.11, >= 1.11.2)
|
||||
rack (>= 1.5.2, < 3)
|
||||
railties (>= 4.0, < 5.2)
|
||||
railties (>= 4.0)
|
||||
activesupport (5.1.6.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
|
@ -97,21 +97,21 @@ GEM
|
|||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
arel (8.0.0)
|
||||
argon2 (1.1.4)
|
||||
argon2 (1.1.5)
|
||||
ffi (~> 1.9)
|
||||
ffi-compiler (~> 0.1)
|
||||
ast (2.4.0)
|
||||
autoprefixer-rails (7.1.6)
|
||||
autoprefixer-rails (9.5.0)
|
||||
execjs
|
||||
binding_of_caller (0.8.0)
|
||||
debug_inspector (>= 0.0.1)
|
||||
biz (1.8.2)
|
||||
clavius (~> 1.0)
|
||||
tzinfo
|
||||
browser (2.5.2)
|
||||
browser (2.5.3)
|
||||
buftok (0.2.0)
|
||||
builder (3.2.3)
|
||||
byebug (10.0.2)
|
||||
byebug (11.0.1)
|
||||
capybara (2.18.0)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
|
@ -139,17 +139,17 @@ GEM
|
|||
composite_primary_keys (10.0.5)
|
||||
activerecord (~> 5.1.0, >= 5.1.6)
|
||||
concurrent-ruby (1.1.5)
|
||||
coveralls (0.7.1)
|
||||
multi_json (~> 1.3)
|
||||
rest-client
|
||||
simplecov (>= 0.7)
|
||||
term-ansicolor
|
||||
thor
|
||||
coveralls (0.8.22)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov (~> 0.16.1)
|
||||
term-ansicolor (~> 1.3)
|
||||
thor (~> 0.19.4)
|
||||
tins (~> 1.6)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.4)
|
||||
daemons (1.2.5)
|
||||
dalli (2.7.6)
|
||||
daemons (1.3.1)
|
||||
dalli (2.7.10)
|
||||
debug_inspector (0.0.3)
|
||||
delayed_job (4.1.5)
|
||||
activesupport (>= 3.0, < 5.3)
|
||||
|
@ -157,11 +157,11 @@ GEM
|
|||
activerecord (>= 3.0, < 5.3)
|
||||
delayed_job (>= 3.0, < 5)
|
||||
diff-lcs (1.3)
|
||||
diffy (3.2.0)
|
||||
docile (1.1.5)
|
||||
diffy (3.3.0)
|
||||
docile (1.3.1)
|
||||
domain_name (0.5.20180417)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
doorkeeper (4.4.0)
|
||||
doorkeeper (5.0.2)
|
||||
railties (>= 4.2)
|
||||
eco (1.0.0)
|
||||
coffee-script
|
||||
|
@ -173,20 +173,20 @@ GEM
|
|||
http_parser.rb (~> 0.6.0)
|
||||
equalizer (0.0.11)
|
||||
erubi (1.8.0)
|
||||
eventmachine (1.2.5)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
factory_bot (4.8.2)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_bot_rails (4.8.2)
|
||||
factory_bot (~> 4.8.2)
|
||||
railties (>= 3.0.0)
|
||||
faker (1.9.1)
|
||||
factory_bot (5.0.2)
|
||||
activesupport (>= 4.2.0)
|
||||
factory_bot_rails (5.0.1)
|
||||
factory_bot (~> 5.0.0)
|
||||
railties (>= 4.2.0)
|
||||
faker (1.9.3)
|
||||
i18n (>= 0.7)
|
||||
faraday (0.15.4)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-http-cache (2.0.0)
|
||||
faraday (~> 0.8)
|
||||
ffi (1.9.25)
|
||||
ffi (1.10.0)
|
||||
ffi-compiler (0.1.3)
|
||||
ffi (>= 1.0.0)
|
||||
rake
|
||||
|
@ -201,10 +201,10 @@ GEM
|
|||
retriable (~> 2.1)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
guard (2.14.1)
|
||||
guard (2.15.0)
|
||||
formatador (>= 0.2.4)
|
||||
listen (>= 2.7, < 4.0)
|
||||
lumberjack (~> 1.0)
|
||||
lumberjack (>= 1.0.12, < 2.0)
|
||||
nenv (~> 0.1)
|
||||
notiffany (~> 0.0)
|
||||
pry (>= 0.9.12)
|
||||
|
@ -219,7 +219,7 @@ GEM
|
|||
guard-symlink (0.1.1)
|
||||
guard
|
||||
guard-compat (~> 1.1)
|
||||
hashdiff (0.3.7)
|
||||
hashdiff (0.3.8)
|
||||
hashie (3.6.0)
|
||||
htmlentities (4.3.4)
|
||||
http (3.3.0)
|
||||
|
@ -234,22 +234,23 @@ GEM
|
|||
httpclient (2.8.3)
|
||||
i18n (1.6.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
icalendar (2.4.1)
|
||||
icalendar (2.5.3)
|
||||
ice_cube (~> 0.16)
|
||||
icalendar-recurrence (1.1.2)
|
||||
icalendar (~> 2.0)
|
||||
ice_cube (~> 0.13)
|
||||
ice_cube (0.16.2)
|
||||
ice_cube (0.16.3)
|
||||
inflection (1.0.0)
|
||||
interception (0.5)
|
||||
jaro_winkler (1.5.2)
|
||||
json (2.1.0)
|
||||
json (2.2.0)
|
||||
jwt (2.1.0)
|
||||
kgio (2.11.2)
|
||||
koala (3.0.0)
|
||||
addressable
|
||||
faraday
|
||||
json (>= 1.8)
|
||||
libv8 (3.16.14.19)
|
||||
libv8 (6.7.288.46.1)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
|
@ -261,7 +262,7 @@ GEM
|
|||
loofah (2.2.3)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
lumberjack (1.0.12)
|
||||
lumberjack (1.0.13)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
method_source (0.9.2)
|
||||
|
@ -270,6 +271,8 @@ GEM
|
|||
mime-types-data (3.2018.0812)
|
||||
mini_mime (1.0.1)
|
||||
mini_portile2 (2.4.0)
|
||||
mini_racer (0.2.4)
|
||||
libv8 (>= 6.3)
|
||||
minitest (5.11.3)
|
||||
multi_json (1.13.1)
|
||||
multi_xml (0.6.0)
|
||||
|
@ -287,32 +290,31 @@ GEM
|
|||
notiffany (0.1.1)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
oauth (0.5.3)
|
||||
oauth (0.5.4)
|
||||
oauth2 (1.4.1)
|
||||
faraday (>= 0.8, < 0.16.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
octokit (4.7.0)
|
||||
octokit (4.13.0)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
omniauth (1.9.0)
|
||||
hashie (>= 3.4.6, < 3.7.0)
|
||||
rack (>= 1.6.2, < 3)
|
||||
omniauth-facebook (4.0.0)
|
||||
omniauth-facebook (5.0.0)
|
||||
omniauth-oauth2 (~> 1.2)
|
||||
omniauth-github (1.3.0)
|
||||
omniauth (~> 1.5)
|
||||
omniauth-oauth2 (>= 1.4.0, < 2.0)
|
||||
omniauth-gitlab (1.0.2)
|
||||
omniauth-gitlab (2.0.0)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-oauth2 (~> 1.0)
|
||||
omniauth-google-oauth2 (0.6.0)
|
||||
omniauth-google-oauth2 (0.6.1)
|
||||
jwt (>= 2.0)
|
||||
omniauth (>= 1.1.1)
|
||||
omniauth-oauth2 (>= 1.5)
|
||||
omniauth-linkedin-oauth2 (0.2.5)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-linkedin-oauth2 (1.0.0)
|
||||
omniauth-oauth2
|
||||
omniauth-microsoft-office365 (0.0.7)
|
||||
omniauth
|
||||
|
@ -326,36 +328,36 @@ GEM
|
|||
omniauth-twitter (1.4.0)
|
||||
omniauth-oauth (~> 1.1)
|
||||
rack
|
||||
omniauth-weibo-oauth2 (0.4.5)
|
||||
omniauth-weibo-oauth2 (0.5.2)
|
||||
omniauth (~> 1.5)
|
||||
omniauth-oauth2 (>= 1.4.0)
|
||||
parallel (1.14.0)
|
||||
parser (2.6.0.0)
|
||||
parallel (1.15.0)
|
||||
parser (2.6.2.0)
|
||||
ast (~> 2.4.0)
|
||||
pg (0.21.0)
|
||||
pluginator (1.5.0)
|
||||
power_assert (1.1.1)
|
||||
pre-commit (0.37.0)
|
||||
power_assert (1.1.4)
|
||||
pre-commit (0.39.0)
|
||||
pluginator (~> 1.5)
|
||||
pry (0.11.3)
|
||||
pry (0.12.2)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.9.0)
|
||||
pry-rails (0.3.6)
|
||||
pry-rails (0.3.9)
|
||||
pry (>= 0.10.4)
|
||||
pry-remote (0.1.8)
|
||||
pry (~> 0.9)
|
||||
slop (~> 3.0)
|
||||
pry-rescue (1.4.5)
|
||||
pry-rescue (1.5.0)
|
||||
interception (>= 0.5)
|
||||
pry
|
||||
pry-stack_explorer (0.4.9.2)
|
||||
pry (>= 0.12.0)
|
||||
pry-stack_explorer (0.4.9.3)
|
||||
binding_of_caller (>= 0.7)
|
||||
pry (>= 0.9.11)
|
||||
psych (3.1.0)
|
||||
public_suffix (3.0.1)
|
||||
puma (3.12.0)
|
||||
public_suffix (3.0.3)
|
||||
puma (3.12.1)
|
||||
rack (2.0.6)
|
||||
rack-livereload (0.3.16)
|
||||
rack-livereload (0.3.17)
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
|
@ -387,11 +389,10 @@ GEM
|
|||
rainbow (3.0.0)
|
||||
raindrops (0.19.0)
|
||||
rake (12.3.2)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
rchardet (1.8.0)
|
||||
ref (2.0.0)
|
||||
rest-client (2.0.2)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
|
@ -399,13 +400,13 @@ GEM
|
|||
retriable (2.1.0)
|
||||
rspec-core (3.8.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-expectations (3.8.1)
|
||||
rspec-expectations (3.8.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-mocks (3.8.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-rails (3.8.0)
|
||||
rspec-rails (3.8.2)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
|
@ -414,7 +415,7 @@ GEM
|
|||
rspec-mocks (~> 3.8.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-support (3.8.0)
|
||||
rszr (0.3.2)
|
||||
rszr (0.4.0)
|
||||
rubocop (0.66.0)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
parallel (~> 1.10)
|
||||
|
@ -426,11 +427,11 @@ GEM
|
|||
ruby-progressbar (1.10.0)
|
||||
ruby_dep (1.5.0)
|
||||
rubyzip (1.2.2)
|
||||
safe_yaml (1.0.4)
|
||||
sassc (2.0.0)
|
||||
ffi (~> 1.9.6)
|
||||
safe_yaml (1.0.5)
|
||||
sassc (2.0.1)
|
||||
ffi (~> 1.9)
|
||||
rake
|
||||
sassc-rails (2.0.0)
|
||||
sassc-rails (2.1.0)
|
||||
railties (>= 4.0.0)
|
||||
sassc (>= 2.0)
|
||||
sprockets (> 3.0)
|
||||
|
@ -439,19 +440,19 @@ GEM
|
|||
sawyer (0.8.1)
|
||||
addressable (>= 2.3.5, < 2.6)
|
||||
faraday (~> 0.8, < 1.0)
|
||||
selenium-webdriver (3.13.1)
|
||||
selenium-webdriver (3.141.0)
|
||||
childprocess (~> 0.5)
|
||||
rubyzip (~> 1.2)
|
||||
rubyzip (~> 1.2, >= 1.2.2)
|
||||
shellany (0.0.1)
|
||||
simple_oauth (0.3.1)
|
||||
simplecov (0.15.1)
|
||||
docile (~> 1.1.0)
|
||||
simplecov (0.16.1)
|
||||
docile (~> 1.1)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
simplecov-rcov (0.2.3)
|
||||
simplecov (>= 0.4.1)
|
||||
slack-notifier (2.3.1)
|
||||
slack-notifier (2.3.2)
|
||||
slop (3.6.0)
|
||||
spring (2.0.2)
|
||||
activesupport (>= 4.2)
|
||||
|
@ -466,37 +467,34 @@ GEM
|
|||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
sqlite3 (1.3.13)
|
||||
sqlite3 (1.4.0)
|
||||
telegramAPI (1.4.2)
|
||||
rest-client (~> 2.0, >= 2.0.2)
|
||||
telephone_number (1.3.0)
|
||||
term-ansicolor (1.6.0)
|
||||
telephone_number (1.3.4)
|
||||
term-ansicolor (1.7.1)
|
||||
tins (~> 1.0)
|
||||
test-unit (3.2.6)
|
||||
test-unit (3.3.0)
|
||||
power_assert
|
||||
therubyracer (0.12.3)
|
||||
libv8 (~> 3.16.14.15)
|
||||
ref
|
||||
thor (0.20.3)
|
||||
thor (0.19.4)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.8)
|
||||
tins (1.15.1)
|
||||
twilio-ruby (5.10.2)
|
||||
tilt (2.0.9)
|
||||
tins (1.20.2)
|
||||
twilio-ruby (5.21.2)
|
||||
faraday (~> 0.9)
|
||||
jwt (>= 1.5, <= 2.5)
|
||||
nokogiri (>= 1.6, < 2.0)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (3.2.0)
|
||||
uglifier (4.1.20)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.5)
|
||||
unicode-display_width (1.5.0)
|
||||
unicorn (5.4.1)
|
||||
unicorn (5.5.0)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
valid_email2 (2.1.0)
|
||||
valid_email2 (3.0.1)
|
||||
activemodel (>= 3.2)
|
||||
mail (~> 2.5)
|
||||
vcr (4.0.0)
|
||||
|
@ -505,7 +503,7 @@ GEM
|
|||
logging
|
||||
nokogiri
|
||||
rubyntlm
|
||||
webmock (3.1.1)
|
||||
webmock (3.5.1)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
|
@ -515,7 +513,7 @@ GEM
|
|||
writeexcel (1.0.5)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
zendesk_api (1.16.0)
|
||||
zendesk_api (1.17.0)
|
||||
faraday (~> 0.9)
|
||||
hashie (>= 3.5.2, < 4.0.0)
|
||||
inflection
|
||||
|
@ -529,7 +527,7 @@ DEPENDENCIES
|
|||
activerecord-import
|
||||
activerecord-nulldb-adapter
|
||||
activerecord-session_store
|
||||
argon2
|
||||
argon2 (= 1.1.5)
|
||||
autodiscover!
|
||||
autoprefixer-rails
|
||||
biz
|
||||
|
@ -565,7 +563,8 @@ DEPENDENCIES
|
|||
libv8
|
||||
mail!
|
||||
mime-types
|
||||
mysql2
|
||||
mini_racer
|
||||
mysql2 (= 0.4.10)
|
||||
net-ldap
|
||||
oauth2
|
||||
omniauth
|
||||
|
@ -578,7 +577,7 @@ DEPENDENCIES
|
|||
omniauth-oauth2
|
||||
omniauth-twitter
|
||||
omniauth-weibo-oauth2
|
||||
pg
|
||||
pg (= 0.21.0)
|
||||
pre-commit
|
||||
pry-rails
|
||||
pry-remote
|
||||
|
@ -591,7 +590,7 @@ DEPENDENCIES
|
|||
rb-fsevent
|
||||
rchardet (>= 1.8.0)
|
||||
rspec-rails
|
||||
rszr
|
||||
rszr (= 0.4.0)
|
||||
rubocop
|
||||
rubyntlm!
|
||||
sassc-rails
|
||||
|
@ -608,7 +607,6 @@ DEPENDENCIES
|
|||
telegramAPI
|
||||
telephone_number
|
||||
test-unit
|
||||
therubyracer
|
||||
twilio-ruby
|
||||
twitter!
|
||||
uglifier
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
FactoryBot.define do
|
||||
factory :avatar do
|
||||
object_lookup_id { ObjectLookup.by_name('User') }
|
||||
o_id 1
|
||||
default true
|
||||
deletable true
|
||||
initial false
|
||||
source 'init'
|
||||
source_url nil
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
created_at Time.zone.now
|
||||
updated_at Time.zone.now
|
||||
o_id { 1 }
|
||||
default { true }
|
||||
deletable { true }
|
||||
initial { false }
|
||||
source { 'init' }
|
||||
source_url { nil }
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
created_at { Time.zone.now }
|
||||
updated_at { Time.zone.now }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
FactoryBot.define do
|
||||
factory :calendar do
|
||||
sequence(:name) { |n| "Escalation Test #{n}" }
|
||||
timezone 'Europe/Berlin'
|
||||
default true
|
||||
ical_url nil
|
||||
timezone { 'Europe/Berlin' }
|
||||
default { true }
|
||||
ical_url { nil }
|
||||
business_hours do
|
||||
{
|
||||
mon: {
|
||||
|
@ -36,7 +36,7 @@ FactoryBot.define do
|
|||
}
|
||||
}
|
||||
end
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
FactoryBot.define do
|
||||
factory :channel do
|
||||
area 'Email::Dummy'
|
||||
area { 'Email::Dummy' }
|
||||
group { ::Group.find(1) }
|
||||
active true
|
||||
active { true }
|
||||
options {}
|
||||
preferences {}
|
||||
updated_by_id 1
|
||||
created_by_id 1
|
||||
updated_by_id { 1 }
|
||||
created_by_id { 1 }
|
||||
|
||||
factory :email_channel do
|
||||
area 'Email::Account'
|
||||
area { 'Email::Account' }
|
||||
options do
|
||||
{
|
||||
inbound: {
|
||||
|
@ -27,7 +27,7 @@ FactoryBot.define do
|
|||
custom_options { {} }
|
||||
end
|
||||
|
||||
area 'Twitter::Account'
|
||||
area { 'Twitter::Account' }
|
||||
options do
|
||||
{
|
||||
adapter: 'twitter',
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
FactoryBot.define do
|
||||
factory :external_credential do
|
||||
factory :facebook_credential do
|
||||
name 'facebook'
|
||||
name { 'facebook' }
|
||||
credentials { { application_id: 123, application_secret: 123 } }
|
||||
end
|
||||
|
||||
factory :twitter_credential do
|
||||
name 'twitter'
|
||||
name { 'twitter' }
|
||||
|
||||
credentials do
|
||||
{ consumer_key: 123,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :group do
|
||||
sequence(:name) { |n| "Group #{n}" }
|
||||
email_address
|
||||
sequence(:name) { |n| "Group #{n}" }
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
FactoryBot.define do
|
||||
factory :http_log do
|
||||
direction 'in'
|
||||
facility 'cti'
|
||||
direction { 'in' }
|
||||
facility { 'cti' }
|
||||
add_attribute(:method) { 'post' }
|
||||
url 'https://zammad.fqdn.com/api/v1/integration/cti/log'
|
||||
url { 'https://zammad.fqdn.com/api/v1/integration/cti/log' }
|
||||
request { { content: 'foo' } }
|
||||
response { { content: 'bar' } }
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :import_job do
|
||||
name 'Import::Test'
|
||||
name { 'Import::Test' }
|
||||
payload {}
|
||||
dry_run false
|
||||
dry_run { false }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,11 +3,17 @@ FactoryBot.define do
|
|||
sequence(:name) { |n| "Test job #{n}" }
|
||||
condition { { 'ticket.state_id' => { 'operator' => 'is not', 'value' => 4 } } }
|
||||
perform { { 'ticket.state_id' => { 'value' => 4 } } }
|
||||
active true
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
active { true }
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
timeplan do
|
||||
{ 'days' => { 'Mon' => true, 'Tue' => false, 'Wed' => false, 'Thu' => false, 'Fri' => false, 'Sat' => false, 'Sun' => false },
|
||||
{ 'days' => { 'Mon' => true,
|
||||
'Tue' => false,
|
||||
'Wed' => false,
|
||||
'Thu' => false,
|
||||
'Fri' => false,
|
||||
'Sat' => false,
|
||||
'Sun' => false },
|
||||
'hours' =>
|
||||
{ '0' => true,
|
||||
'1' => false,
|
||||
|
@ -33,7 +39,12 @@ FactoryBot.define do
|
|||
'21' => false,
|
||||
'22' => false,
|
||||
'23' => false },
|
||||
'minutes' => { '0' => true, '10' => false, '20' => false, '30' => false, '40' => false, '50' => false } }
|
||||
'minutes' => { '0' => true,
|
||||
'10' => false,
|
||||
'20' => false,
|
||||
'30' => false,
|
||||
'40' => false,
|
||||
'50' => false } }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :locale do
|
||||
locale 'de-de'
|
||||
name 'Deutsch'
|
||||
locale { 'de-de' }
|
||||
name { 'Deutsch' }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :macro do
|
||||
sequence(:name) { |n| "Macro #{n}" }
|
||||
perform do
|
||||
{}
|
||||
end
|
||||
perform { {} }
|
||||
ux_flow_next_up { 'next_task' }
|
||||
note { '' }
|
||||
active { true }
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
FactoryBot.define do
|
||||
factory :notification_factory_renderer, class: NotificationFactory::Renderer do
|
||||
objects {}
|
||||
locale 'en-en'
|
||||
template ''
|
||||
escape true
|
||||
locale { 'en-en' }
|
||||
template { '' }
|
||||
escape { true }
|
||||
|
||||
initialize_with { new(objects: objects, locale: locale, template: template, escape: escape) }
|
||||
end
|
||||
|
|
|
@ -1,24 +1,18 @@
|
|||
FactoryBot.define do
|
||||
sequence :object_manager_attribute_name do |n|
|
||||
"internal_name#{n}"
|
||||
end
|
||||
|
||||
sequence :object_manager_attribute_display do |n|
|
||||
"Display Name #{n}"
|
||||
end
|
||||
end
|
||||
|
||||
FactoryBot.define do
|
||||
factory :object_manager_attribute, class: ObjectManager::Attribute do
|
||||
|
||||
object_lookup_id { ObjectLookup.by_name('Ticket') }
|
||||
name { generate(:object_manager_attribute_name) }
|
||||
display { generate(:object_manager_attribute_display) }
|
||||
data_option_new do
|
||||
{}
|
||||
end
|
||||
editable true
|
||||
active true
|
||||
sequence(:name) { |n| "internal_name#{n}" }
|
||||
sequence(:display) { |n| "Display Name #{n}" }
|
||||
data_option_new { {} }
|
||||
editable { true }
|
||||
active { true }
|
||||
add_attribute(:to_create) { true }
|
||||
to_migrate { true }
|
||||
to_delete { false }
|
||||
to_config { false }
|
||||
position { 15 }
|
||||
updated_by_id { 1 }
|
||||
created_by_id { 1 }
|
||||
screens do
|
||||
{
|
||||
'create_top' => {
|
||||
|
@ -29,17 +23,10 @@ FactoryBot.define do
|
|||
'edit' => {}
|
||||
}
|
||||
end
|
||||
add_attribute(:to_create) { true }
|
||||
to_migrate true
|
||||
to_delete false
|
||||
to_config false
|
||||
position 15
|
||||
updated_by_id 1
|
||||
created_by_id 1
|
||||
end
|
||||
|
||||
factory :object_manager_attribute_text, parent: :object_manager_attribute do
|
||||
data_type 'input'
|
||||
data_type { 'input' }
|
||||
data_option do
|
||||
{
|
||||
'type' => 'text',
|
||||
|
@ -54,7 +41,7 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
factory :object_manager_attribute_integer, parent: :object_manager_attribute do
|
||||
data_type 'integer'
|
||||
data_type { 'integer' }
|
||||
data_option do
|
||||
{
|
||||
'default' => 0,
|
||||
|
@ -65,8 +52,8 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
factory :object_manager_attribute_date, parent: :object_manager_attribute do
|
||||
name 'date_attribute'
|
||||
data_type 'date'
|
||||
name { 'date_attribute' }
|
||||
data_type { 'date' }
|
||||
data_option do
|
||||
{
|
||||
'diff' => 24,
|
||||
|
@ -76,8 +63,8 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
factory :object_manager_attribute_datetime, parent: :object_manager_attribute do
|
||||
name 'datetime_attribute'
|
||||
data_type 'datetime'
|
||||
name { 'datetime_attribute' }
|
||||
data_type { 'datetime' }
|
||||
data_option do
|
||||
{
|
||||
'future' => true,
|
||||
|
@ -89,7 +76,7 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
factory :object_manager_attribute_select, parent: :object_manager_attribute do
|
||||
data_type 'select'
|
||||
data_type { 'select' }
|
||||
data_option do
|
||||
{
|
||||
'default' => '',
|
||||
|
@ -109,7 +96,7 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
factory :object_manager_attribute_tree_select, parent: :object_manager_attribute do
|
||||
data_type 'tree_select'
|
||||
data_type { 'tree_select' }
|
||||
data_option do
|
||||
{
|
||||
'options' => [
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
FactoryBot.define do
|
||||
factory :postmaster_filter do
|
||||
sequence(:name) { |n| "Test PostmasterFilter #{n}" }
|
||||
channel 'email'
|
||||
channel { 'email' }
|
||||
match { { 'from' => { 'operator' => 'contains', 'value' => 'a' } } }
|
||||
perform { { 'x-zammad-ticket-tags' => { 'operator' => 'remove', 'value' => 'test2, test7' } } }
|
||||
active true
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
active { true }
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
FactoryBot.define do
|
||||
sequence :test_role_name do |n|
|
||||
"TestRole#{n}"
|
||||
end
|
||||
end
|
||||
|
||||
FactoryBot.define do
|
||||
factory :role do
|
||||
name { generate(:test_role_name) }
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
sequence(:name) { |n| "TestRole#{n}" }
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
|
||||
factory :agent_role do
|
||||
permissions { Permission.where(name: 'ticket.agent') }
|
||||
|
|
|
@ -1,25 +1,18 @@
|
|||
FactoryBot.define do
|
||||
sequence :test_scheduler_name do |n|
|
||||
"Testscheduler#{n}"
|
||||
end
|
||||
end
|
||||
|
||||
FactoryBot.define do
|
||||
|
||||
factory :scheduler do
|
||||
name { generate(:test_scheduler_name) }
|
||||
sequence(:name) { |n| "Testscheduler#{n}" }
|
||||
last_run { Time.zone.now }
|
||||
pid 1337
|
||||
prio 1
|
||||
status 'ok'
|
||||
active true
|
||||
pid { 1337 }
|
||||
prio { 1 }
|
||||
status { 'ok' }
|
||||
active { true }
|
||||
period { 10.minutes }
|
||||
running false
|
||||
note 'test'
|
||||
updated_by_id 1
|
||||
created_by_id 1
|
||||
created_at 1
|
||||
updated_at 1
|
||||
running { false }
|
||||
note { 'test' }
|
||||
updated_by_id { 1 }
|
||||
created_by_id { 1 }
|
||||
created_at { 1 }
|
||||
updated_at { 1 }
|
||||
add_attribute(:method) { 'test' }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
FactoryBot.define do
|
||||
sequence :test_signature_name do |n|
|
||||
"Test signature #{n}"
|
||||
end
|
||||
end
|
||||
|
||||
FactoryBot.define do
|
||||
factory :signature do
|
||||
name { generate(:test_signature_name) }
|
||||
body '#{user.firstname} #{user.lastname}'.text2html # rubocop:disable Lint/InterpolationCheck
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
sequence(:name) { |n| "Test signature #{n}" }
|
||||
body { '#{user.firstname} #{user.lastname}'.text2html } # rubocop:disable Lint/InterpolationCheck
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
FactoryBot.define do
|
||||
factory :taskbar do
|
||||
client_id 123
|
||||
key 'Ticket-1234'
|
||||
client_id { 123 }
|
||||
key { 'Ticket-1234' }
|
||||
add_attribute(:callback) { 'TicketZoom' }
|
||||
params do
|
||||
{}
|
||||
end
|
||||
params { {} }
|
||||
state {}
|
||||
prio 1
|
||||
notify false
|
||||
prio { 1 }
|
||||
notify { false }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
FactoryBot.define do
|
||||
factory :ticket do
|
||||
transient do
|
||||
state_name 'new'
|
||||
priority_name '2 normal'
|
||||
state_name { 'new' }
|
||||
priority_name { '2 normal' }
|
||||
end
|
||||
|
||||
title { 'Test Ticket' }
|
||||
group
|
||||
association :group, strategy: :create # or else build(:ticket).save fails
|
||||
|
||||
customer
|
||||
title { 'Test Ticket' }
|
||||
state { Ticket::State.lookup(name: state_name) }
|
||||
priority { Ticket::Priority.lookup(name: priority_name) }
|
||||
updated_by_id { 1 }
|
||||
|
|
|
@ -5,7 +5,7 @@ FactoryBot.define do
|
|||
sender_name { 'Customer' }
|
||||
end
|
||||
|
||||
ticket
|
||||
association :ticket, strategy: :create # or else build(:ticket_article).save fails
|
||||
from { 'factory-customer-1@example.com' }
|
||||
to { 'factory-customer-1@example.com' }
|
||||
subject { 'factory article' }
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :'ticket/priority', aliases: %i[ticket_priority] do
|
||||
sequence :name do |n|
|
||||
"#{n} urgent"
|
||||
end
|
||||
|
||||
sequence(:name) { |n| "#{n} urgent" }
|
||||
updated_by_id { 1 }
|
||||
created_by_id { 1 }
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ FactoryBot.define do
|
|||
factory :'ticket/time_accounting', aliases: %i[ticket_time_accounting] do
|
||||
ticket
|
||||
time_unit { rand(100) }
|
||||
created_by_id 1
|
||||
created_by_id { 1 }
|
||||
|
||||
trait :for_article do
|
||||
ticket_article { create(:'ticket/article', ticket: ticket) }
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
FactoryBot.define do
|
||||
factory :translation do
|
||||
locale 'de-de'
|
||||
source 'date'
|
||||
target 'dd/mm/yyyy'
|
||||
created_by_id 1
|
||||
updated_by_id 1
|
||||
locale { 'de-de' }
|
||||
source { 'date' }
|
||||
target { 'dd/mm/yyyy' }
|
||||
created_by_id { 1 }
|
||||
updated_by_id { 1 }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
FactoryBot.define do
|
||||
sequence :fingerprint do |n|
|
||||
"fingerprint#{n}"
|
||||
end
|
||||
end
|
||||
|
||||
FactoryBot.define do
|
||||
|
||||
factory :user_device do
|
||||
user_id 1
|
||||
name 'test 1'
|
||||
location 'some location'
|
||||
user_agent 'some user agent'
|
||||
ip '127.0.0.1'
|
||||
fingerprint { generate(:fingerprint) }
|
||||
user_id { 1 }
|
||||
name { 'test 1' }
|
||||
location { 'some location' }
|
||||
user_agent { 'some user agent' }
|
||||
ip { '127.0.0.1' }
|
||||
sequence(:fingerprint) { |n| "fingerprint#{n}" }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
4
spec/factories/vendor/net/ldap/entry.rb
vendored
4
spec/factories/vendor/net/ldap/entry.rb
vendored
|
@ -4,8 +4,6 @@ FactoryBot.define do
|
|||
# mocked_entry = build(:ldap_entry)
|
||||
# mocked_entry['attr'] = [value, another_value]
|
||||
factory :ldap_entry, class: Net::LDAP::Entry do
|
||||
initialize_with do
|
||||
new('dc=com')
|
||||
end
|
||||
initialize_with { new('dc=com') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -40,7 +40,7 @@ RSpec.describe Ticket, type: :model do
|
|||
|
||||
it 'returns a list of unique tickets (i.e., no duplicates)' do
|
||||
expect(Ticket.selectors(condition, limit: 100, access: 'full'))
|
||||
.to match_array([2, tickets])
|
||||
.to match_array([2, tickets.to_a])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue