marty 1.2.9 → 2.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 +4 -4
- data/Gemfile +11 -9
- data/Gemfile.lock +93 -80
- data/app/components/marty/data_grid_view.rb +1 -1
- data/app/components/marty/main_auth_app.rb +1 -1
- data/app/components/marty/mcfly_grid_panel/client/dup_in_form.js +1 -1
- data/app/components/marty/posting_grid.rb +1 -1
- data/app/components/marty/promise_view.rb +1 -1
- data/app/components/marty/simple_app.rb +1 -1
- data/app/controllers/marty/application_controller.rb +2 -2
- data/app/controllers/marty/diagnostic/controller.rb +1 -5
- data/app/models/marty/api_auth.rb +6 -4
- data/app/models/marty/config.rb +1 -1
- data/app/models/marty/data_grid.rb +13 -13
- data/app/models/marty/delorean_rule.rb +2 -2
- data/app/models/marty/event.rb +1 -1
- data/app/models/marty/import_type.rb +2 -2
- data/app/models/marty/name_validator.rb +1 -1
- data/app/models/marty/posting.rb +0 -5
- data/app/models/marty/user.rb +1 -1
- data/app/views/marty/diagnostic/diag.html.erb +0 -2
- data/config/routes.rb +2 -2
- data/db/migrate/003_create_marty_users.rb +1 -1
- data/db/migrate/004_create_marty_roles.rb +1 -1
- data/db/migrate/005_create_marty_user_roles.rb +1 -1
- data/db/migrate/006_create_marty_tokens.rb +1 -1
- data/db/migrate/008_create_marty_posting_types.rb +1 -1
- data/db/migrate/068_create_marty_import_types.rb +1 -1
- data/db/migrate/069_create_marty_import_synonyms.rb +1 -1
- data/db/migrate/070_create_versions.rb +1 -1
- data/db/migrate/071_add_object_changes_column_to_versions.rb +1 -1
- data/db/migrate/072_add_validation_function_to_import_types.rb +1 -1
- data/db/migrate/073_add_preprocess_function_to_import_types.rb +1 -1
- data/db/migrate/090_create_delayed_jobs.rb +1 -1
- data/db/migrate/091_create_marty_promises.rb +1 -1
- data/db/migrate/096_add_user_roles_to_import_types.rb +1 -1
- data/db/migrate/097_drop_versions.rb +1 -1
- data/db/migrate/099_create_marty_configs.rb +1 -1
- data/db/migrate/101_create_marty_grid_index_numranges.rb +1 -1
- data/db/migrate/102_create_marty_grid_index_int4ranges.rb +1 -1
- data/db/migrate/103_create_marty_grid_index_integers.rb +1 -1
- data/db/migrate/104_create_marty_grid_index_strings.rb +1 -1
- data/db/migrate/105_create_marty_grid_index_booleans.rb +1 -1
- data/db/migrate/106_make_grid_indexes_nullable.rb +1 -1
- data/db/migrate/200_create_marty_event_operation_enum.rb +1 -1
- data/db/migrate/201_create_marty_events.rb +1 -1
- data/db/migrate/202_add_completion_status_to_event.rb +1 -1
- data/db/migrate/300_create_marty_api_configs.rb +1 -1
- data/db/migrate/301_create_marty_api_log.rb +1 -1
- data/db/migrate/302_add_api_configs_validate_result.rb +1 -1
- data/db/migrate/303_create_marty_logs.rb +1 -1
- data/db/migrate/304_drop_marty_api_logs.rb +1 -1
- data/db/migrate/400_create_dg_plv8_v1_fns.rb +1 -1
- data/lib/marty/migrations.rb +7 -8
- data/lib/marty/monkey.rb +2 -30
- data/lib/marty/version.rb +1 -1
- data/marty.gemspec +3 -4
- data/other/marty/diagnostic/aws/ec2_instance.rb +65 -25
- data/other/marty/diagnostic/base.rb +14 -5
- data/other/marty/diagnostic/collection.rb +1 -0
- data/other/marty/diagnostic/{delayed_job.rb → delayed_job_version.rb} +2 -8
- data/other/marty/diagnostic/delayed_job_workers.rb +11 -0
- data/other/marty/diagnostic/environment_variables.rb +4 -6
- data/other/marty/diagnostic/fatal.rb +0 -5
- data/other/marty/diagnostic/node.rb +4 -3
- data/other/marty/diagnostic/nodes.rb +46 -13
- data/other/marty/diagnostic/packer.rb +22 -25
- data/other/marty/diagnostic/version.rb +19 -21
- data/script_id, +0 -0
- data/spec/controllers/diagnostic/controller_spec.rb +8 -7
- data/spec/controllers/job_controller_spec.rb +5 -5
- data/spec/controllers/rpc_controller_spec.rb +52 -57
- data/spec/controllers/rpc_import_spec.rb +1 -1
- data/spec/dummy/config/environments/test.rb +4 -2
- data/spec/dummy/db/migrate/20140000000000_create_enums.rb +1 -1
- data/spec/dummy/db/migrate/20150406171536_create_categories.rb +2 -2
- data/spec/dummy/db/migrate/20150408200916_create_loan_programs.rb +1 -1
- data/spec/dummy/db/migrate/20150408201429_create_types.rb +1 -1
- data/spec/dummy/db/migrate/20151023000001_create_simple.rb +1 -1
- data/spec/dummy/db/migrate/20160100000038_create_gemini_states.rb +1 -1
- data/spec/dummy/db/migrate/20160923183516_add_bulk_pricing_event_ops.rb +1 -1
- data/spec/dummy/db/migrate/20170706081300_add_state_array_to_lp.rb +1 -1
- data/spec/dummy/db/migrate/20170725160000_add_misc_arrays_to_lp.rb +1 -1
- data/spec/dummy/db/migrate/20171220150101_add_rule_type_enums.rb +1 -1
- data/spec/dummy/db/migrate/20171222150100_add_rule_indices.rb +1 -1
- data/spec/features/auth_app_spec.rb +1 -0
- data/spec/features/data_import_spec.rb +2 -2
- data/spec/features/log_view_spec.rb +4 -4
- data/spec/features/reporting_spec.rb +16 -19
- data/spec/features/rule_spec.rb +11 -8
- data/spec/features/scripting_spec.rb +2 -2
- data/spec/features/scripting_test_spec.rb +0 -2
- data/spec/features/user_view_spec.rb +4 -6
- data/spec/lib/logger_spec.rb +4 -4
- data/spec/models/event_spec.rb +4 -4
- data/spec/models/promise_spec.rb +1 -1
- data/spec/other/diagnostic/base_spec.rb +12 -12
- data/spec/other/diagnostic/collection_spec.rb +8 -8
- data/spec/other/diagnostic/{delayed_job_spec.rb → delayed_job_version_spec.rb} +4 -4
- data/spec/other/diagnostic/delayed_job_workers_spec.rb +44 -0
- data/spec/other/diagnostic/reporter_spec.rb +13 -17
- data/spec/spec_helper.rb +36 -14
- data/spec/support/clean_db_helpers.rb +2 -2
- metadata +14 -39
|
@@ -8,8 +8,10 @@ Dummy::Application.configure do
|
|
|
8
8
|
config.cache_classes = true
|
|
9
9
|
|
|
10
10
|
# Configure static asset server for tests with Cache-Control for performance
|
|
11
|
-
config.
|
|
12
|
-
config.
|
|
11
|
+
config.public_file_server.enabled = true
|
|
12
|
+
config.public_file_server.headers = {
|
|
13
|
+
'Cache-Control' => 'public, max-age=3600'
|
|
14
|
+
}
|
|
13
15
|
|
|
14
16
|
# Log error messages when you accidentally call methods on nil
|
|
15
17
|
config.whiny_nils = true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
class CreateCategories < ActiveRecord::Migration
|
|
1
|
+
class CreateCategories < ActiveRecord::Migration[4.2]
|
|
2
2
|
def up
|
|
3
|
-
ActiveRecord::Migration.new.create_table 'entities' do |t|
|
|
3
|
+
ActiveRecord::Migration[4.2].new.create_table 'entities' do |t|
|
|
4
4
|
t.string :name
|
|
5
5
|
end
|
|
6
6
|
McflyAppendOnlyMigration.new.create_table 'gemini_bud_categories' do |t|
|
|
@@ -70,7 +70,7 @@ feature 'under Applications menu, Reports using Data Import', js: true do
|
|
|
70
70
|
#hacky: assumes only 1 combobox without label
|
|
71
71
|
within(:gridpanel, 'report_select', match: :first, wait: 5) do
|
|
72
72
|
# hacky, hardcoding netzkecombobox dropdown arrow name
|
|
73
|
-
arrow = find(:input, 'nodename')['componentid'] + '-trigger-picker'
|
|
73
|
+
arrow = find(:input, 'nodename')['data-componentid'] + '-trigger-picker'
|
|
74
74
|
find(:xpath, ".//div[@id='#{arrow}']").click
|
|
75
75
|
find(:xpath, "//li[text()='Data Import Job (csv)']").click
|
|
76
76
|
end
|
|
@@ -137,7 +137,7 @@ feature 'under Applications menu, Reports using Data Import', js: true do
|
|
|
137
137
|
#hacky: assumes only 1 combobox without label
|
|
138
138
|
within(:gridpanel, 'report_select', match: :first) do
|
|
139
139
|
# hacky, hardcoding netzkecombobox dropdown arrow name
|
|
140
|
-
arrow = find(:input, 'nodename')['componentid'] + '-trigger-picker'
|
|
140
|
+
arrow = find(:input, 'nodename')['data-componentid'] + '-trigger-picker'
|
|
141
141
|
find(:xpath, ".//div[@id='#{arrow}']").click
|
|
142
142
|
find(:xpath, "//li[text()='Data Import Job (csv)']").click
|
|
143
143
|
end
|
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
|
3
3
|
feature 'logger view', js: true, capybara: true do
|
|
4
4
|
|
|
5
5
|
before(:all) do
|
|
6
|
-
self.
|
|
6
|
+
self.use_transactional_tests = false
|
|
7
7
|
Marty::Log.delete_all
|
|
8
8
|
|
|
9
9
|
info_s = { info: 'message' }
|
|
@@ -36,7 +36,7 @@ feature 'logger view', js: true, capybara: true do
|
|
|
36
36
|
after(:all) do
|
|
37
37
|
restore_clean_db(@clean_file)
|
|
38
38
|
Marty::Log.delete_all
|
|
39
|
-
self.
|
|
39
|
+
self.use_transactional_tests = true
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
let(:logview) { netzke_find('log_view') }
|
|
@@ -66,10 +66,10 @@ feature 'logger view', js: true, capybara: true do
|
|
|
66
66
|
find(:xpath, "//input[contains(@id, 'textfield')]", wait: 5).set(days)
|
|
67
67
|
press('OK')
|
|
68
68
|
wait_for_ready
|
|
69
|
-
find(
|
|
69
|
+
find('.x-tool-refresh').click
|
|
70
70
|
wait_for_ready
|
|
71
71
|
end
|
|
72
|
-
|
|
72
|
+
wait_for_ajax
|
|
73
73
|
cnt = logview.row_count()
|
|
74
74
|
expect(cnt).to eq(exp_count)
|
|
75
75
|
types = logview.col_values('message_type', cnt, 0)
|
|
@@ -94,7 +94,7 @@ DELOREAN
|
|
|
94
94
|
#hacky: assumes only 1 combobox without label
|
|
95
95
|
within(:gridpanel, 'report_select', match: :first) do
|
|
96
96
|
# hacky, hardcoding netzkecombobox dropdown arrow name
|
|
97
|
-
arrow = find(:input, 'nodename')['componentid'] + '-trigger-picker'
|
|
97
|
+
arrow = find(:input, 'nodename')['data-componentid'] + '-trigger-picker'
|
|
98
98
|
find(:xpath, ".//div[@id='#{arrow}']").click
|
|
99
99
|
find(:xpath, "//li[text()='#{node_name}']").click
|
|
100
100
|
end
|
|
@@ -121,7 +121,6 @@ DELOREAN
|
|
|
121
121
|
|
|
122
122
|
by 'select 2nd tag' do
|
|
123
123
|
wait_for_ajax
|
|
124
|
-
zoom_out
|
|
125
124
|
tag_grid.select_row(2)
|
|
126
125
|
end
|
|
127
126
|
|
|
@@ -187,7 +186,6 @@ DELOREAN
|
|
|
187
186
|
|
|
188
187
|
by 'select 2nd tag' do
|
|
189
188
|
wait_for_ajax
|
|
190
|
-
zoom_out
|
|
191
189
|
tag_grid.select_row(2)
|
|
192
190
|
end
|
|
193
191
|
|
|
@@ -219,7 +217,6 @@ DELOREAN
|
|
|
219
217
|
|
|
220
218
|
by 'select 2nd tag' do
|
|
221
219
|
wait_for_ajax
|
|
222
|
-
zoom_out
|
|
223
220
|
tag_grid.select_row(2)
|
|
224
221
|
end
|
|
225
222
|
|
|
@@ -245,7 +242,6 @@ DELOREAN
|
|
|
245
242
|
|
|
246
243
|
by 'select 2nd tag' do
|
|
247
244
|
wait_for_ajax
|
|
248
|
-
zoom_out
|
|
249
245
|
tag_grid.select_row(2)
|
|
250
246
|
end
|
|
251
247
|
|
|
@@ -255,8 +251,17 @@ DELOREAN
|
|
|
255
251
|
|
|
256
252
|
and_by 'no DD [role: dev] (csv)' do
|
|
257
253
|
expect(script_combo.get_values).to include('AA (csv)',
|
|
258
|
-
|
|
259
|
-
|
|
254
|
+
'CC (csv)',
|
|
255
|
+
'---')
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
it 'can generate report through generated url' do
|
|
260
|
+
url = generate_rep_url(format: 'txt') + URI.encode('&disposition=inline')
|
|
261
|
+
visit url
|
|
262
|
+
wait_for_element do
|
|
263
|
+
expect(page).to have_content('XYZ1,XYZ2,XYZ3,XYZ4 1,2,3,4 2,4,6,8 ' +
|
|
264
|
+
'3,6,9,12 4,8,12,16')
|
|
260
265
|
end
|
|
261
266
|
end
|
|
262
267
|
|
|
@@ -276,21 +281,13 @@ DELOREAN
|
|
|
276
281
|
wait_for_ajax
|
|
277
282
|
set_field_value('XYZ', '', 'pt_name')
|
|
278
283
|
set_field_value('true', 'textfield', 'selected_testing')
|
|
279
|
-
|
|
280
|
-
|
|
284
|
+
press("Generate URL")
|
|
285
|
+
wait_for_ajax
|
|
286
|
+
|
|
287
|
+
within_window(switch_to_window(windows.last)) do
|
|
281
288
|
url = generate_rep_url
|
|
282
289
|
expect(page).to have_content(url)
|
|
283
290
|
end
|
|
284
|
-
new_window.close
|
|
285
|
-
end
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
it 'can generate report through generated url' do
|
|
289
|
-
url = generate_rep_url(format: 'txt') + URI.encode('&disposition=inline')
|
|
290
|
-
visit url
|
|
291
|
-
wait_for_element do
|
|
292
|
-
expect(page).to have_content('XYZ1,XYZ2,XYZ3,XYZ4 1,2,3,4 2,4,6,8 ' +
|
|
293
|
-
'3,6,9,12 4,8,12,16')
|
|
294
291
|
end
|
|
295
292
|
end
|
|
296
293
|
end
|
data/spec/features/rule_spec.rb
CHANGED
|
@@ -36,9 +36,12 @@ feature 'rule view', js: true do
|
|
|
36
36
|
# click_checkbox in marty_rspec not working here for some reason
|
|
37
37
|
def click_checkbox(name)
|
|
38
38
|
q = %Q(checkbox[fieldLabel="#{name}"])
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
page.execute_script <<-JS
|
|
40
|
+
var checkbox = Ext.ComponentQuery.query('#{q}')[0];
|
|
41
|
+
checkbox.setValue(!checkbox.value);
|
|
42
|
+
JS
|
|
41
43
|
end
|
|
44
|
+
|
|
42
45
|
# click_col in marty_rspec is not reliable
|
|
43
46
|
def click_column(rv,name)
|
|
44
47
|
cid = col_id(rv, name)
|
|
@@ -75,7 +78,6 @@ feature 'rule view', js: true do
|
|
|
75
78
|
end
|
|
76
79
|
it "rule workflow" do
|
|
77
80
|
log_in_as('marty')
|
|
78
|
-
page.driver.browser.manage.window.maximize
|
|
79
81
|
go_to_my_rules
|
|
80
82
|
mrv = netzke_find("my_rule_view")
|
|
81
83
|
# test required field
|
|
@@ -97,8 +99,8 @@ feature 'rule view', js: true do
|
|
|
97
99
|
expect(mrv.row_count()).to eq(9)
|
|
98
100
|
expect(mrv.get_row_vals(1)).to include({"name"=>"abc",
|
|
99
101
|
"rule_type"=>"SimpleRule",
|
|
100
|
-
"start_dt"=>"2013-01-
|
|
101
|
-
"end_dt"=>"2030-01-
|
|
102
|
+
"start_dt"=>"2013-01-01T11:03:01",
|
|
103
|
+
"end_dt"=>"2030-01-01T08:03:01",
|
|
102
104
|
"other_flag"=>false,
|
|
103
105
|
"g_array"=>"",
|
|
104
106
|
"g_single"=>"",
|
|
@@ -113,7 +115,8 @@ feature 'rule view', js: true do
|
|
|
113
115
|
"computed_guards"=>"",
|
|
114
116
|
"grids"=>"",
|
|
115
117
|
"results"=>"",
|
|
116
|
-
|
|
118
|
+
})
|
|
119
|
+
|
|
117
120
|
r = Gemini::MyRule.lookup('infinity','abc')
|
|
118
121
|
expect(r.as_json).to include({"user_id"=>1,
|
|
119
122
|
"o_user_id"=>nil,
|
|
@@ -153,8 +156,8 @@ feature 'rule view', js: true do
|
|
|
153
156
|
wait_for_ajax
|
|
154
157
|
exp = {"name"=>"abc",
|
|
155
158
|
"rule_type"=>"SimpleRule",
|
|
156
|
-
"start_dt"=>"2013-01-
|
|
157
|
-
"end_dt"=>"2030-01-
|
|
159
|
+
"start_dt"=>"2013-01-01T11:03:01",
|
|
160
|
+
"end_dt"=>"2030-01-01T08:03:01",
|
|
158
161
|
"other_flag"=>true,
|
|
159
162
|
"g_array"=>"G1V1,G1V3",
|
|
160
163
|
"g_single"=>"G2V2",
|
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
|
3
3
|
feature 'under Applications menu, Scripting workflows', js: true do
|
|
4
4
|
|
|
5
5
|
before(:all) do
|
|
6
|
-
self.
|
|
6
|
+
self.use_transactional_tests = false
|
|
7
7
|
|
|
8
8
|
@clean_file = "/tmp/clean_#{Process.pid}.psql"
|
|
9
9
|
save_clean_db(@clean_file)
|
|
@@ -20,7 +20,7 @@ feature 'under Applications menu, Scripting workflows', js: true do
|
|
|
20
20
|
|
|
21
21
|
after(:all) do
|
|
22
22
|
restore_clean_db(@clean_file)
|
|
23
|
-
self.
|
|
23
|
+
self.use_transactional_tests = true
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def go_to_scripting
|
|
@@ -100,7 +100,6 @@ DELOREAN
|
|
|
100
100
|
|
|
101
101
|
by 'select M1 sample script' do
|
|
102
102
|
wait_for_ajax
|
|
103
|
-
zoom_out
|
|
104
103
|
tag_grid.select_row(2)
|
|
105
104
|
script_grid.select_row(1)
|
|
106
105
|
tab_press('Testing')
|
|
@@ -278,7 +277,6 @@ DELOREAN
|
|
|
278
277
|
|
|
279
278
|
by 'select M3 sample script' do
|
|
280
279
|
wait_for_ajax
|
|
281
|
-
zoom_out
|
|
282
280
|
script_grid.select_row(3)
|
|
283
281
|
tab_press('Testing')
|
|
284
282
|
end
|
|
@@ -40,7 +40,6 @@ feature 'under Sytem menu, User Management worflows', js: true do
|
|
|
40
40
|
|
|
41
41
|
by 'add new user' do
|
|
42
42
|
wait_for_ajax
|
|
43
|
-
zoom_out
|
|
44
43
|
press('New User')
|
|
45
44
|
within(:gridpanel, 'add_window', match: :first) do
|
|
46
45
|
press 'OK'
|
|
@@ -78,10 +77,10 @@ feature 'under Sytem menu, User Management worflows', js: true do
|
|
|
78
77
|
and_by 'check row got edited' do
|
|
79
78
|
wait_for_ajax
|
|
80
79
|
expect(user_view.get_row_vals(2)).to netzke_include({
|
|
81
|
-
:login=>"new_login",
|
|
82
|
-
:firstname=>"new_fname",
|
|
83
|
-
:lastname=>"new_lname",
|
|
84
|
-
:active=>true,
|
|
80
|
+
:login=>"new_login",
|
|
81
|
+
:firstname=>"new_fname",
|
|
82
|
+
:lastname=>"new_lname",
|
|
83
|
+
:active=>true,
|
|
85
84
|
:roles=>"User Manager,Viewer",
|
|
86
85
|
})
|
|
87
86
|
end
|
|
@@ -114,7 +113,6 @@ feature 'under Sytem menu, User Management worflows', js: true do
|
|
|
114
113
|
user_view = netzke_find('user_view')
|
|
115
114
|
by 'check buttons' do
|
|
116
115
|
find(:btn, 'New User', match: :first)
|
|
117
|
-
zoom_out
|
|
118
116
|
user_view.select_row(1)
|
|
119
117
|
expect(btn_disabled?('New User')).to be_falsy
|
|
120
118
|
expect(btn_disabled?('Edit')).to be_falsy
|
data/spec/lib/logger_spec.rb
CHANGED
|
@@ -4,14 +4,14 @@ require 'job_helper'
|
|
|
4
4
|
module Marty
|
|
5
5
|
describe Logger do
|
|
6
6
|
before(:all) do
|
|
7
|
-
self.
|
|
7
|
+
self.use_transactional_tests = false
|
|
8
8
|
end
|
|
9
9
|
before(:each) do
|
|
10
10
|
Marty::Log.delete_all
|
|
11
11
|
end
|
|
12
12
|
after(:all) do
|
|
13
13
|
Marty::Log.delete_all
|
|
14
|
-
self.
|
|
14
|
+
self.use_transactional_tests = true
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
it "log has its own connection" do
|
|
@@ -63,7 +63,7 @@ module Marty
|
|
|
63
63
|
@clean_file = "/tmp/clean_#{Process.pid}.psql"
|
|
64
64
|
save_clean_db(@clean_file)
|
|
65
65
|
# transactional fixtures interfere with queueing jobs
|
|
66
|
-
self.
|
|
66
|
+
self.use_transactional_tests = false
|
|
67
67
|
Marty::Log.cleanup(0)
|
|
68
68
|
|
|
69
69
|
# Needed here because shutting transactional fixtures off
|
|
@@ -78,7 +78,7 @@ module Marty
|
|
|
78
78
|
stop_delayed_job
|
|
79
79
|
File.unlink("/tmp/logaction.txt")
|
|
80
80
|
Marty::Log.cleanup(0)
|
|
81
|
-
self.
|
|
81
|
+
self.use_transactional_tests = true
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
it "handles heavy load" do
|
data/spec/models/event_spec.rb
CHANGED
|
@@ -8,7 +8,7 @@ describe Marty::Event do
|
|
|
8
8
|
save_clean_db(@clean_file)
|
|
9
9
|
|
|
10
10
|
# transactional fixtures interfere with queueing jobs
|
|
11
|
-
self.
|
|
11
|
+
self.use_transactional_tests = false
|
|
12
12
|
|
|
13
13
|
# Needed here because shutting transactional fixtures off
|
|
14
14
|
# means we lose the globally set user
|
|
@@ -65,7 +65,7 @@ describe Marty::Event do
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
after(:all) do
|
|
68
|
-
self.
|
|
68
|
+
self.use_transactional_tests = true
|
|
69
69
|
restore_clean_db(@clean_file)
|
|
70
70
|
stop_delayed_job
|
|
71
71
|
end
|
|
@@ -172,7 +172,7 @@ describe Marty::Event do
|
|
|
172
172
|
"enum_event_operation"=>"AVM",
|
|
173
173
|
"comment"=>"wassup",
|
|
174
174
|
"expire_secs"=>nil,
|
|
175
|
-
"error"=>
|
|
175
|
+
"error"=> false})
|
|
176
176
|
Marty::Event.update_comment(ev.first, "updated")
|
|
177
177
|
ev = Marty::Event.lookup_event('testcl1', 123, 'AVM')
|
|
178
178
|
expect(ev.first).to include({"comment"=>"updated"})
|
|
@@ -192,7 +192,7 @@ describe Marty::Event do
|
|
|
192
192
|
"enum_event_operation"=>"PRICING",
|
|
193
193
|
"comment"=>"c comment",
|
|
194
194
|
"expire_secs"=>nil,
|
|
195
|
-
"error"=>
|
|
195
|
+
"error"=>false})
|
|
196
196
|
|
|
197
197
|
af = Marty::Event.all_finished
|
|
198
198
|
expect(af.count).to eq(4)
|
data/spec/models/promise_spec.rb
CHANGED
|
@@ -6,7 +6,7 @@ describe Marty::Promise, slow: true do
|
|
|
6
6
|
@clean_file = "/tmp/clean_#{Process.pid}.psql"
|
|
7
7
|
save_clean_db(@clean_file)
|
|
8
8
|
# transactional fixtures interfere with queueing jobs
|
|
9
|
-
self.
|
|
9
|
+
self.use_transactional_tests = false
|
|
10
10
|
|
|
11
11
|
# Needed here because shutting transactional fixtures off
|
|
12
12
|
# means we lose the globally set user
|